/srv/irclogs.ubuntu.com/2009/12/28/#ubuntu-ec2.txt

flaccidanyone alive that can help on disable_root and ec2-fetch-credentials ?00:35
flaccidi'm trying to work out this system they introduced in karmic00:35
flaccidi'm not sure why they do it this way instead of just sshd and pam00:36
erichammondflaccid: Are you wanting to enable ssh to root?00:37
flaccidheya Eric, yeah, I have raised an enhancement request so we can enable other users than root to login and also call scripts etc.00:37
flaccidfor now, i just want to re-enable root so i can bundle this test instance which has been right-enabled00:38
flaccidthen i can look at the more specific issue in the ticket raised indirectly by yourself00:38
flaccidinteresting implementation canonical does in /usr/bin/ec2-fetch-credentials ..00:40
erichammondI posted a description on how to enable root towards the end of http://alestic.com/2009/04/ubuntu-ec2-sudo-ssh-rsync00:40
flaccidi don't think that is going to do the trick, but i will try00:44
flaccidwow it does. how does that work?00:46
flaccidi'm trying to work out what calls /usr/bin/ec2-fetch-credentials to check disable_root boolean00:46
flaccidhmmm bundle call from rs dash still silently failing00:49
flaccidi think i will have to call the ec2 api manually00:53
erichammondflaccid: /etc/init.d/ec2-init00:54
erichammondcalls ec2-fetch-credentials00:54
erichammondWhere do you see disable_root?00:54
flaccidgrep disable_root /usr/bin/ec2-fetch-credentials00:57
flaccidwould you be able to help me with a manual bundle then?01:04
erichammondflaccid: of a running instance?01:05
erichammondor building an AMI from scratch?01:05
flaccidyeah so ec2-bundle-vol on a running instance. need to know best practices for the params on a running instance w/ rightscale01:05
flaccidbasically because i've never done it before, need to know what params i should be giving http://docs.amazonwebservices.com/AmazonEC2/dg/2006-10-01/CLTRG-ami-bundle-vol.html01:06
erichammondHere are my notes which should work on Karmic: http://alestic.com/2009/06/ec2-ami-bundle01:07
flaccidgreat, thats quite detailed, thanks eric01:07
erichammondI'm also building Karmic AMIs from scratch with vmbuilder but haven't published any notes yet.01:08
flaccidgot any ideas why rs bundle call is silently failing after enabling root ?01:08
erichammondI don't think I've ever used the RightScale bundle button.01:09
flaccidim testing bundle of Ubuntu 9.10 Karmicami-1515f67c after right-enabling01:09
flaccidyeah, our bundle button is not reliable and i wouldn't mind working out why. but without interaction with eng I don't know what the api call it issues is. would be good if aws logged all api calls and responses..01:09
erichammondAre there any logs on the system?  Have any Ubuntu AMIs been able to be bundled that way before?01:10
erichammondPerhaps it's an incompatibility with commands between CentOS and Ubuntu.01:10
flaccidwe only notify that the bundle call was initiated. i can bundle jaunty no problem and also done debian01:10
flaccidi'll show you the build toolkit i made01:11
flacciderichammond: https://rightscale-services.s3.amazonaws.com:443/rightimage-build-toolkit/README01:12
flacciderichammond: could you summarise the main roadblock you had, thus the ticket submitted?01:13
flaccidin regards to /bin/env: bad interpreter: No such file or directory. thats actually our bug. we should be using /usr/bin/env01:15
flaccidin my build-toolkit i create an extra symlink to work around this01:15
erichammondThis shows up in /var/log/install: "touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory"01:16
flaccidyeah i got that in jaunty as well. just need to touch it iirc01:16
erichammondand "/opt/rightscale/bin/ec2.sh: /opt/rightscale/bin/WaitFor: /bin/env: bad   interpreter: No such file or directory"01:16
flaccidyeah for that one, do, /bin/env: symbolic link to `/usr/bin/env'01:16
erichammondsymlink sounds like a very temporary workaround which should be corrected quickly.01:17
flaccidproblem is they may not update the current rightscale scripts due to focus on RightLink01:17
flaccidwe can still raise bugs and try to get priority on them01:17
erichammondok, I can try adding these and see how the build goes: mkdir /var/lock/subsys; ln -s /usr/bin/env /usr/env01:19
flaccidmkdir -p /var/lock/subsys && touch /var/lock/subsys/rightscale; ln -s /usr/bin/env /bin/env01:21
flaccid:)01:21
erichammondthanks01:21
flaccidnps01:21
erichammondIt's ok for subsys/rightscale to be owned by root?01:21
flaccidyep01:21
flaccidgenerally nothing in there most of the time01:22
flaccidif i add the mkdir/touch to my build toolkit, that should cover full support for jaunty and karmic01:23
flaccidjust going to launch an rs server w/ jaunty template and rightimage to verify the console output errors such as the /var/lock/subsys/rightscale01:27
erichammondflaccid: All these different ways of installing RightScale are starting to wear me down.  What you just listed is different from what Martin provided me which is different from the other 4 ways I used to do it.01:41
flaccidwell, that certainly is a problem01:43
erichammondHopefully, we'll end up with a single recommended approach out of all this.01:43
flaccidits going to be hard, particularly because of the focus on RightLink which will provide packages to simply install the RightLink agent01:46
flaccidhave you seen http://support.rightscale.com/index.php?title=06-FAQs/FAQ_0103_-_How_do_I_make_any_Amazon_Machine_Image_%28AMI%29_capable_of_running_RightScripts%3F ? my build toolkit is basically a fork of that01:46
erichammondHere's the basic script from Martin which requires setting a number of envariables first: http://alestic-downloads.s3.amazonaws.com/rightscale_install01:49
erichammondI see overlaps with your code.01:49
flaccidyes that is correct01:49
erichammondflaccid: so which one is preferred?01:52
flaccidthere is no preferred. its all up to you. there is no official way to do this01:53
flaccidthe equiv of this script is https://rightscale-services.s3.amazonaws.com/rightimage-build-toolkit%2Finstall_rightscale.bash and i just polished it up and modularised some things into other scripts01:54
erichammondIs root ssh required to perform some RightScale functions?01:54
flaccidyes because ssh/root is used01:54
erichammondflaccid: Were you looking for this before? /etc/ec2-init/ec2-config.cfg02:01
flaccidah yes02:02
flaccidthis is bundled by canonical right?02:02
erichammondyes, that file is on the Canonical AMIs02:02
flaccidcoolio02:03
erichammondand any AMIs which are built with vmbuilder, I presume.02:03
erichammond(I'll know shortly)02:03
flaccidokies02:04
flaccidwell i am actually getting the output from our worker on running the bundling script02:04
flaccidlooks like missing dep for the script02:04
flaccid[2009-12-28 02:05:51] [Ec2BundleWorker] : ERR: /home/ec2//lib/ec2/amitools/crypto.rb:13:in `require': no such file to load -- openssl (LoadError)\n02:09
flaccidneed openssl rubygem02:09
flaccidapt-get install libopenssl-ruby issued02:10
flaccidbundling initiated02:12
flaccidrsync is going so it appears to be working without error so far02:12
flaccidtar is running. good so far..02:15
flaccidgzip running :)02:17
flaccidsplitting bundle now02:23
flacciderichammond: that was successful. let me see how it goes now under an rs server02:25
rbergerIf I launch a canonical US-West AMI in US West it doesn't have access to http://us.ec2.archive.ubuntu.com/ubuntu/dists/karmic-updates and apt-get update fails02:25
rbergerAnyone know how to fix it or if I'm doing something wrong?02:26
erichammondrberger: You can switch to us-west-1.ec2.archive.ubuntu.com02:27
erichammondOr (as I do) switch to the RightScale Ubuntu mirrors.02:27
rbergererichammond: Thanks, is this a known bug?  What is the address of the rightscale ubuntu mirros (ps you are my hero :-)02:28
erichammondrberger: https://bugs.launchpad.net/ubuntu/karmic/+source/ec2-init/+bug/49418502:31
uvirtbotLaunchpad bug 494185 in ec2-init "ec2-init selects us-east-1 mirror when running in us-west-1 region" [High,Fix committed]02:31
erichammondIt's marked "fix released", but I didn't think that it was in the latest official AMI from Canonical.02:31
erichammondI also suspect it will not work for you if you rebundle an AMI in us-east-1 and then migrate it to us-west-1 or eu-west-1.02:32
erichammondrberger: If you have runurl installed (http://alestic.com/2009/08/runurl) then the following command switches to the RightScale Ubuntu apt repository mirrors: sudo runurl run.alestic.com/apt/rightscale02:33
erichammondIf you want to only upgrade to the Ubuntu archives as of a particular date, RightScale keeps daily snapshots.  For, say, December 1: sudo runurl run.alestic.com/apt/rightscale 2009/12/0102:34
flaccidcool02:34
erichammondRightScale has 2 load balanced, failover mirrors in us-west-1 and 3 in us-east-1.02:35
erichammondWhen one of the EC2 availability zones failed a couple months back, my instances in a different availability zone could still upgrade because they failed over to the mirror in a zone which was working.02:36
flacciderichammond: i have a RightImage karmic working. would just need some script mods for monitoring and scripting to work, but this is separate to the image of course02:36
erichammondflaccid: Glad to hear it.  I'm continuing on the path I was traveling with some mods from this session, but may switch over to your code if I have problems.02:37
flaccidyeah its really just a matter of dealing with each issue02:38
flacciderichammond: those errors you saw, they were in console output right?02:38
erichammondflaccid: They were in /var/log/install if we're talking about the same thing02:39
rbergererichammond: I am using the ami canonical lists on their website ami-7d3c6d38. THanks again.02:39
flacciderichammond: ok. i will check this02:39
flacciderichammond: a launch and terminate shows no errors in console output. so i will now go over the /var/log/install on a fresh launch02:40
erichammondrberger: Though I pointed you to some code on run.alestic.com I should caution you that it is just my playground and should not be used for production systems.  Feel free to copy the code and host it on your own reliable locations.02:40
rbergererichammond: Will do. Working on gettiing my own base system on us-west for use with opscode chef. Hopefully it won't be too hard... All your tools and docs are a big help!02:42
erichammondrberger: Glad you find them useful.02:42
flaccidrberger: have you checked out rightscale/chef yet ?02:42
rbergerflaccid: Does the rightscale/ chef stuff cost money on a instance-hour basis?02:43
flaccidrberger: no02:43
flaccidyou can get a free developer account if you wanna try it out02:43
flaccidwell from memory you get chef w/ free accounts02:44
flaccidpersonally, im not into chef at all. im not a ruby guy either02:44
rbergerflaccid: But in production it cost per instance per hour? I'm more concerned about production as our base line system is over 10 nodes..02:44
flaccidrberger: rightscale is a management platform, your cloud accounts such as AWS are with them02:45
erichammondflaccid: Ok, my vmbuilder-built, RightScale-enabled, Karmic AMIs work when started with the EC2 API.  Now to tag them with the magic tags in RightScale and test them there.02:46
rbergerflaccid: It seems that the righscale folks are doing great stuff but we can't afford to pay extra on a per node/hour basis.02:47
flacciderichammond: ok so you are essentially saying you are up to testing, right ?02:47
erichammondflaccid: yep, testing in RightScale.02:47
erichammondflaccid: Is there a trivial RightScript I could use to test that RightScript functionality works?02:47
erichammondI wrote my own, but figured there should be something available in the public library.02:47
flaccidrberger: we don't charge anything per hour, only certain overages with premium accounts. a free dev account doesn't cost you anything, only AWS...02:48
flacciderichammond: a hello world is a good one to use02:48
flaccidi don't think there is anything in the library unfortunately02:48
flaccidi just use a bash hello world02:48
rbergerflaccid: I'll look into it again, thanks02:48
flaccidrberger: nps. im a support engineer with RightScale. so if you have any questions, i'm around..02:49
flacciderichammond: ok so only error left i have is touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory because i didn't do anything before bundling. can i ask where you did the mkdir and touch for this ?02:51
flaccidjust before bundling or in a sequence ?02:51
erichammondThat was needed in the rightscale install script I was running, so I did mkdir/touch before I ran it.02:52
erichammondI'm building the image from scratch in a subdirectory, so I had to include the root of the image directory as well.02:53
flaccidyeah so you just mkdir and touch before bundling so it exists in the image, correct?02:53
flaccidok doing another bundle after touching this file02:59
flaccidi'll let you know if i can find any problems/limitations after i have updated the template to use the new image02:59
erichammondflaccid: yes03:00
flacciddanke03:05
erichammondflaccid: No luck: flaccid: touch: cannot touch `/var/lock/subsys/rightscale': No such file or directory03:06
erichammondThis may be wiped out in the boot process.03:06
flaccidokies, i shall look into this now!03:06
erichammondIt may need to be fixed by RightScale when running on Ubuntu.03:06
erichammondI think Ubuntu would expect it to be /var/lock/rightscale/xxx03:08
erichammondwith RightScale creating the subdirectory03:08
erichammondAt least that's how the other /var/lock users seem to be behaving on my system.03:08
erichammond/var/lock has the same permissions as /tmp (world writable, sticky bit)03:09
flaccidmight have to add to /etc/rc.local or something03:09
flaccidlet me just replicate the problem from this new bundle when its done03:09
erichammondIt has to be done before /etc/init.d/rightscale runs at S9003:10
flaccidright03:11
flaccidi assume /etc/rc.local is practically the last thing after the rc seq yeah ?03:11
erichammondS99 I believe03:13
flaccidah rightio03:13
flaccidi'll check it out03:13
erichammondI'm also getting what looks like a more serious error in RightScale startup.  Here's the whole /var/log/install - http://paste.ubuntu.com/347903/03:13
flacciddanke03:15
erichammondAdding: apt-get install libxml-simple-ruby03:16
erichammondbut this is going to be a slow process if I have to keep building AMIs to test :-\03:16
erichammondShould I switch to your code/03:16
erichammond?03:16
flaccidyes iirc i handled that in my build toolkit03:16
flaccidprobably in the deps scripts03:17
flaccidoops, dep script.03:17
flaccidyeah certainly covered that when i hit it03:17
erichammondflaccid: Are these still the latest and greatest instructions? https://rightscale-services.s3.amazonaws.com:443/rightimage-build-toolkit/README03:22
flacciderichammond: yes. the whole thing is authored by myself and any updated, i just save straight back to the files03:23
erichammondHm, looks like I'll have to chroot to the image directory first.03:24
flaccidi should create a TODO, there is still some things to add like java jre03:25
flaccidnot sure why you would need to do something like that on a running instance..03:25
erichammondI'm not bundling my running instance.  I'm building a fresh Karmic AMI from scratch using vmbuilder.03:25
flaccidok, sounds good then03:25
flaccidkeep in mind this build toolkit is for running instances bundling. i havnt done any scratch stuff03:26
erichammondDoes your code handle setting disable_root ?03:26
flaccidnegative. i have not updated anything for karmic yet03:28
erichammondok03:28
flaccidbut that atm, looks like the intention. i doubt eng are going to address this 'feature' anytime in the near future..03:28
flaccidit does need to be addressed and my fav OS is freebsd, so when ec2 upgrades xen, i need support for non-root03:29
flaccidok so rc.local will get run before rightscale init03:43
flaccidok i am re-bundling with the touch in /etc/rc.local03:50
erichammondflaccid: From what I see S90rightscale is run before S99rc.local03:53
flaccidlrwxrwxrwx 1 root root  18 2009-10-27 13:43 S99rc.local -> ../init.d/rc.local03:54
flaccidlrwxrwxrwx 1 root root  20 2009-12-27 23:43 S99rightscale -> ../init.d/rightscale03:54
flaccidits S99 for both, so rc comes before ri03:54
erichammondAh, you have rightscale at a different level in your software.03:54
flaccidwell at least this is how it is with karmic in runlevel 4 default03:54
flacciderichammond: maybe. i don't recall changing this manually, so we would need to see how it is set03:55
flaccidcan check that out in regression03:55
erichammondWhat problems does that missing directory/file cause?03:55
flaccidnone that i have noticed03:58
flaccidi don't even know what its for03:58
flaccidrelaunching with new bundle04:02
=== emacsian1 is now known as emacsian
flacciderichammond: that did the trick. so its all good, except for the fact that its not official supported yet and thus repos support is a no go etc.04:11
erichammondThe Ubuntu repositories hosted by RightScale are very stable.  In my experience, they have been more stable than the mirrors hosted by Canonical in EC2.04:13
flaccidand also the logging and monitoring scripts will require updates04:13
erichammondyeah, that makes sense.04:13
flacciderichammond: thats the repos themselves. im referring to the userland implementation on the instance. we don't support new versions yet and i'm not sure if the later releases are mirrored.04:13
flaccidconfiguring software repos will return Failed to generate repository configuration: unsupported ubuntu release 9.1004:14
erichammondflaccid: Ok, it looks like basic RightScale integration is working on my custom vmbuilder Karmic AMIs.  I'm still using Martin's code with info from this discussion with you.06:41
erichammondAt least basic RightScript stuff works, though I also see your latest errors, too (Failed to generate repository configuration: unsupported ubuntu release 9.10).06:41
erichammondThanks for your help.06:41
erichammondI'm off to see Avatar 3D again...06:41
flaccidcoolio06:42
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond
=== erichammond1 is now known as erichammond

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!