/srv/irclogs.ubuntu.com/2011/06/02/#ubuntu-ensemble.txt

=== _mup__ is now known as _mup_
niemeyerNight all02:40
_mup_txzookeeper/session-event-handling r40 committed by kapil.foss@gmail.com11:53
_mup_allow connection using existing session, test session expiration, additional symbol name translation for exceptions.11:53
_mup_txzookeeper/session-event-handling r41 committed by kapil.foss@gmail.com13:06
_mup_pep8isms13:06
kim0do I really need to type "yes" to the ssh authenticity question13:17
niemeyerkim0: How do you mean?13:21
kim0ensemble status13:22
kim0I get the ssh yes/no prompt13:22
kim0same for debug-hooks13:22
kim0niemeyer: that is normal right ?13:23
niemeyerkim0: You mean the prompt asking you if the fingerprint for the server is valid?13:24
kim0yes13:24
niemeyerkim0: Yeah, that's usual when connecting to a new server13:24
kim0Would be great if Ensemble would get the machine log .. and verify it for me 13:24
* kim0 grabs his wish list bag13:24
kim0Also if ensemble had a presistent connection to bootstrap node :) and perhaps run locally under a screen session with "watch status" and debug-log ..etc all running13:25
kim0niemeyer: I think I am see'ing strange behaviour which I hope someoen can help me with since I really want to write this "write a formula doc". I just launched a mysql SU, and a drupal SU (based on an almost empty new formula)13:27
kim0fired debug-hooks drupal/0 .. works13:28
kim0add-relation drupal mysql13:28
kim0I am not getting any new windows in the debug-hooks screen13:28
niemeyerHmm13:29
niemeyerkim0: Thinking13:30
kim0sure13:30
kim0I think I saw this yesterday13:30
kim0when I closed the debug-hooks screen ..13:30
kim0hooks suddenly started firing13:30
kim0it's like it was stuck 13:30
niemeyerkim0: That's normal13:30
kim0but I always blame myself :)13:30
niemeyerkim0: Hooks are serially executed13:30
kim0well there were not opening new windows in screen session13:31
kim0they should right ?13:31
niemeyerkim0: You won't get another hook window until you stop the existing one13:31
kim0there was no existing one .. I was waiting for it13:31
kim0just like now .. there's only window 0 in screen13:31
niemeyerkim0: and what's 0?13:32
hazmatkim0, it was disabled (the ssh fingerprint confirm prompt)13:32
kim0niemeyer: just a shell13:32
hazmatbut it leaves things open to man in the middle13:32
hazmatwe should pull it down though automatically 13:32
niemeyerhazmat: Do you have any ideas of what might be going on for kim0?13:32
kim0hazmat: yeah .. check my wish list :) we could ec2-get-console-output and verify it :)13:32
niemeyerkim0: WE can do better than that13:33
niemeyerkim0: We should inject the host key13:33
niemeyerkim0: That's in our wishlist already :)13:33
hazmatniemeyer, man in the middle was the primary reason fingerprint checking was renabled yes?13:33
* hazmat reads through log13:33
niemeyerhazmat: That's right13:33
kim0niemeyer: cool !13:33
kim0niemeyer: cloud-init can inject host key already indeed .. that's even better13:34
hazmatindeed, we should probably make use of that, but we need to store in zk for multi-client access13:34
hazmatkim0, okay.. so you've got a debug hook session on drupal or mysql?13:35
hazmatwhen doing the add relation13:35
kim0drupal13:35
kim0hazmat: debug-hooks drupal/013:35
kim0hazmat: add-relation drupal mysql13:35
kim0that's it .. no new window in screen13:35
hazmatkim0, okay.. so you do debugs for  install & start? 13:35
hazmator are you debugging after start?13:36
kim0the sequence was13:36
kim0deploy mysql13:36
kim0deploy drupal13:36
kim0debug-hooks drupal/013:36
kim0debug-log13:36
kim0add-relation mysql drupal13:36
hazmatkim0, could you paste your debug-log13:36
kim0I got a "install" or "start" hook here can't remember .. which I closed13:36
kim0I expected to get the db-relation-changed one after it .. but didn't13:37
kim0sure13:37
hazmatkim0, by closing are you exiting the shell or just closing the window?13:37
hazmathmm13:37
hazmati don't think i've tested closing the window instead of exiting the shell13:37
kim0hazmat: ctrl + d13:37
kim0exit shell13:37
kim0hazmat: log http://paste.ubuntu.com/616692/13:37
hazmathmm that should be fine13:37
niemeyerhazmat: Should be equivalent13:38
kim0hazmat: status → http://paste.ubuntu.com/616694/13:38
hazmatniemeyer, yeah.. but on the close window case, there is still a callback to screen to close the window after the process exit13:38
hazmatbut ctrl +d vs. exit is equiv13:38
niemeyerhazmat: I don't understand that distinction13:39
hazmatkim0, odd it seems like the unit hasn't picked up the relation13:39
kim0:s13:39
kim0can u connect to the env ?13:39
niemeyerhazmat: The callback will execute after the shell process exits, right?  Either option would kill it13:39
niemeyerhazmat: IOW, closing the window also terminates the shell13:40
niemeyerhazmat: This would happen if the hook wasn't executed13:40
hazmatniemeyer, right, but we have  another process checking on the shell and then instructing screen to kill the window, which is probably just a noop at that point13:40
hazmatniemeyer, its unrelated to what kim0 is seeing13:40
niemeyerhazmat: I mean, the relation not showing up13:41
niemeyerkim0: Can you please paste ps auxw for that machine?13:41
niemeyerkim0: The drupal one13:41
kim0niemeyer: from the debug-hooks screen is ok right ?13:41
niemeyerhazmat: Hmm.. unless we're running the shell script with -e, and screen exits with 1 because the window wasn't there?13:41
* niemeyer doing guess work13:42
niemeyerkim0: Yeah13:42
kim0http://paste.ubuntu.com/616696/13:42
niemeyerhazmat: "install".. there's an old hook running still13:43
kim0I hope I didn't do something stupid at the end :)13:44
niemeyerkim0: I suspect your window 0 has the install hook running13:44
niemeyerkim0: Can you please paste "env" from that window13:44
kim0http://paste.ubuntu.com/616698/13:45
hazmatniemeyer, window 0 is never used for hooks its .. its always a shell13:45
kim0window 0 is always there 13:45
kim0yeah 13:45
niemeyerhazmat: It's trivial to shift windows around13:45
hazmatniemeyer, but the names are distinct on the windows13:46
kim0http://paste.ubuntu.com/616699/ is the install hook itself13:46
niemeyerOk, but that's not the case either way13:46
niemeyerStill, we have a hook running13:46
niemeyerhazmat: Ok13:46
hazmatthe debug stuff names the windows by hook , except window 0 which is named 'shell' afaicr13:46
* kim0 nods13:47
niemeyerkim0: What's in /tmp/tmpLjxVDG-install13:47
kim0niemeyer: http://paste.ubuntu.com/616700/13:47
kim0scary script 13:47
hazmatso it seems somehow the debug window was ended but the underlying debug process is still alive.13:47
niemeyerhazmat: Yeah, it's still in the sleep loop13:48
niemeyerhazmat: Which confirms your initial theory13:48
kim0I probably closed the window too fast, if you think it needs time to do anything13:49
hazmatit might be a different signal gets sent besides HUP that needs to be caught here13:49
hazmatkim0, it shouldn't matter13:49
hazmatwe should never rely on user timing13:50
kim0yeah I know 13:50
niemeyerhazmat: TERM, KILL13:50
niemeyerhazmat: Wait.. the HUP is catching the outside signal13:51
niemeyerhazmat: That's not the problem.. that script is still running13:51
hazmatyeah.. its not in the screen process13:51
niemeyerkim0: One more: /proc/1585/environ13:52
kim0http://paste.ubuntu.com/616708/13:53
kim0niemeyer: not sure why it has no newlines13:53
kim0doh13:53
niemeyerhazmat: We should monitor it from outside instead of expecting it to do stuff before it dies13:53
kim0sorry .. pastebinit error13:53
niemeyerkim0: That's the file format indeed13:53
kim0niemeyer: http://paste.ubuntu.com/616709/13:54
kim0this is complete13:54
niemeyerhazmat: e.g. writing to hook.pid when the process starts13:54
* kim0 probably just uncovered a pastebinit bug13:55
hazmatniemeyer, yeah.. and then just doing something like kill -0 `cat hook.pid`  for the sleep condition13:55
niemeyerhazmat: RIght13:55
* hazmat files a bug13:56
niemeyerhazmat: Another handy issue for a brain breaker.. will paste that conversation in a bug.13:56
niemeyerhazmat: Oh, ok :)13:56
niemeyerhazmat: Please paste the log for context13:56
niemeyerhazmat: Thanks13:56
niemeyerkim0: Alright.. we know what's wrong13:56
kim0great :)13:56
niemeyerkim0: For fixing your problem right now,13:56
niemeyerkim0: kill 158513:57
kim0got it 13:57
kim0thanks13:57
niemeyerkim0: np13:57
kim0wonder why no one else is hitting this13:57
niemeyerkim0: Thanks a lot for your help uncovering the bug13:57
niemeyerkim0: It's the way the debug-hook window was closed13:57
kim0ah so you close it clike ctrl-a c13:58
kim0ok13:58
kim0not c .. whatever closes windows :)13:58
kim0ew14:00
kim0ok probably hitting a new one14:00
kim0I killed the process .. got the window for db-relation-changed14:01
kim0relation-get inside it says →  No ENSEMBLE_AGENT_SOCKET/-s option found14:01
kim0env dump http://paste.ubuntu.com/616713/14:01
kim0hazmat: could you please as well14:02
* hazmat looks14:03
hazmatkim0, that's the env from window 0 ?14:03
hazmator the debug window?14:03
kim0hazmat: no win 114:03
kim0the db-relation-changed window14:03
kim0db-relation-joined actually14:03
hazmatit doesn't look like it has the debug environment variables sourced14:04
niemeyerThat's the shell isn't it?14:04
niemeyerSUDO_COMMAND=/usr/bin/byobu -xRS drupal-0-hook-debug -t shell14:05
niemeyerkim0: I think the paste is bogus14:06
niemeyerkim0: Or maybe I just misunderstand what the variables mean14:07
kim0I can repaste manually14:07
kim0anything to look for ?14:07
niemeyerkim0: Just thinking how to get the pid for the parent shell14:08
kim0ps -elf | grep $$ ?14:08
kim0it'd be listed in ppid field14:08
niemeyerkim0: echo $BASHPID14:08
kim0922914:09
niemeyerkim0: echo $PPID14:09
kim093514:09
* kim0 feels like a shell14:09
niemeyerOk, cool14:09
niemeyerkim0: Hehe :-)14:09
kim0:)14:09
niemeyerkim0: Yeah, looks like a failure in source it indeed14:10
niemeyersourcing14:10
kim0we don't log those steps somewhere ?14:10
niemeyerCan't imagine how that could happen, though, even if we killed the process14:10
niemeyerkim0: Nope, this is the bootstrapping of debugging itself.. we might indeed have to log it in the future14:11
niemeyerkim0: Can you please paste the new process list so we can reach the new hook14:11
kim0http://paste.ubuntu.com/616722/14:12
kim0guess no one uses debug-hooks really :)14:13
* kim0 afk for 5 mins14:13
niemeyerkim0: We do, but we don't generally kill processes in the middle14:15
hazmatkim0, just me ;-)14:15
hazmatneed to run a quick errand, back in a bit14:15
niemeyerkim0: Let me know when you're back.. we can follow on a bit if you're interested14:23
kim0niemeyer: back14:24
niemeyerkim0: Ok, let's see /tmp/tmpR1UhMY-db-relation-joined then14:25
kim0niemeyer: http://paste.ubuntu.com/616737/14:25
niemeyerkim0: Ok, please figure ENSEMBLE_DEBUG from /proc/9187/environ, and list $ENSEMBLE_DEBUG/env.sh14:26
kim0niemeyer: can't see ENSEMBLE_DEBUG .. paste http://paste.ubuntu.com/616742/14:28
niemeyerkim0: Hmm.. I guess it wasn't exported14:30
* niemeyer htinks14:31
niemeyerthinks14:31
niemeyerkim0: Ok, let's try to find by force: cd /tmp && find -name env.sh14:34
niemeyerkim0: Will probably see more than one14:34
kim0niemeyer: 3 of em14:35
niemeyerkim0: Ok, let's fine the one with db-relation-joined14:35
kim0http://paste.ubuntu.com/616746/14:36
kim0http://paste.ubuntu.com/616747/14:36
kim0http://paste.ubuntu.com/616748/14:36
kim0niemeyer: I tried grep'ing .. doesn't have joined in them14:37
niemeyerkim0: Well, that's likely the issue then.. let me check14:37
niemeyerkim0: That's weird..14:39
niemeyerkim0: All of them have ENSEMBLE_AGENT_SOCKET14:39
kim0maybe none of them is sourced14:39
niemeyerkim0: This is the right one for db-relation-joined: http://paste.ubuntu.com/616747/14:40
niemeyerkim0: Can you please paste the hook.sh file living in the same directory?14:41
niemeyerkim0: Well, that's the thing14:41
niemeyerkim0: There's no easy way for bash to be executed without this being sourced14:41
kim0niemeyer: http://paste.ubuntu.com/616754/14:41
niemeyerkim0: As you can see..14:41
niemeyerkim0: That prior paste is from /tmp/tmp.Sj2ilkd53B/env.sh, right?14:42
kim0double checking 14:42
kim0should be yes14:43
niemeyerkim0: Ok, so there's really no way for bash to be executed without it being sourced, which is awkward..14:43
niemeyerkim0: You got a bash, without the env variables, but the only way for that bash to have come up, was through the sourcing line14:44
niemeyerHmmm14:44
kim0thinking as well14:44
kim0niemeyer: parent process for the Window1 shell, is byobu, not the hook.sh ?14:46
niemeyerkim0: Yeah, that's strange14:47
kim0hook.sh should still be running if it fired us right14:47
niemeyerkim0: Indeed14:47
niemeyerkim0: This would also justify the previous issue as well, interestingly14:47
niemeyerkim0: Hmm14:48
niemeyerkim0: Let me do a local test, hold on14:48
kim0niemeyer: pstree -p .. if that's helpful http://paste.ubuntu.com/616757/14:49
hazmat  nice.. half way to my walking desk finished14:51
kim0hazmat: walking desk ?14:51
hazmatkim0, treadmill with keyboard tray and monitor stand14:52
kim0oh that's new to me ... sounds cool indeed :)14:52
hazmatkim0,  http://opinionator.blogs.nytimes.com/2010/02/23/stand-up-while-you-read-this/ ... http://www.nytimes.com/2008/09/18/health/nutrition/18fitness.html14:52
hazmatkim0, lots of a good evidence for the benefits vs sitting in a chair all day14:53
kim0yeah that's intuitive14:53
hazmatthe only problem is that the treadmill weighs 250 pounds.. just carried it up the stairs.. so most of the way done on the setup14:53
* hazmat catches up the irc log to get up to speed on debug-hooks14:54
kim0hazmat: congrats :) send pics to warthogs :)14:54
kim0niemeyer: I'm going for a late lunch .. I have inserted your ssh key into ec2-67-202-22-46.compute-1.amazonaws.com (drupal/0) should you want to login to it14:56
niemeyerkim0: Cheers14:56
niemeyerkim0: Will check it out14:56
kim0cool14:56
niemeyerhazmat: I suspect both issues likely boil down to the way the shell is being executed15:16
niemeyerhazmat: It's doing a two-step execution, and it's not entirely clear why15:16
hazmatniemeyer, what's strange is that it works sometimes15:16
hazmatwriting up a reply to tom for his questions on list15:16
niemeyerhazmat: It first creates a window, which spawns an outside shell by screen itself15:16
niemeyerhazmat: then overwrites a shell onto it15:17
niemeyerhazmat: I suspect we may be hitting some race within screen itself15:17
niemeyerhazmat: Is there a reason why you coded it like that, or is it safe to change?15:17
hazmatniemeyer, its safe to change, i thought that creation was per your suggestion15:18
niemeyerhazmat: It's unrelated to my suggestion15:19
hazmatthe openstack nova screen setup does a similiar setup15:19
niemeyerhazmat: It's executing two shells for no reason15:19
niemeyerhazmat: Rather than only hook.sh15:19
hazmatright15:19
hazmatso instead of creating the window it should just exec in the named window?15:19
niemeyerhazmat: The "screen" command of screen takes an executable as an argument15:20
niemeyerhazmat: -X screen -t .. hook.sh15:20
niemeyerhazmat: The shell I'm seeing in kim0's is the shell from the first screen command, not the one from the exec15:20
hazmatniemeyer, that sounds good to me 15:21
kim0hope that bug got caught16:01
niemeyerkim0: Sounds like so..16:03
niemeyerkim0: Will try something this afternoon16:03
kim0awesome16:03
niemeyerkim0: Thanks for all your help16:03
kim0All thanks to you :)16:03
* hazmat lunches16:15
* niemeyer too16:20
kim0hmm17:42
kim0        state: install_error17:42
kim0if service is having install_error .. any facility to figure out what went wrong17:43
kim0ok I could figure it out17:46
niemeyerkim0: I was kind of expecting that..17:51
niemeyerkim0: Is that the service we were debugging?17:51
kim0niemeyer: I shutdown the env and started a fresh17:51
niemeyerkim0: Oh, ok17:51
niemeyerkim0: ensemble log, ensemble debug-hook, etc17:51
kim0niemeyer: does the log not provide hooks stdout any more ?17:52
kim0is it supressed by default17:52
niemeyerkim0: It does, but you have to turn it on earlier17:52
niemeyerWe should really have a feature where it logs by default17:52
niemeyerand rotates them out after a while17:52
niemeyerkim0: Otherwise, the best bet is logging in the machine and checking logs17:52
niemeyerkim0: You should be able to retry, though17:53
niemeyerkim0: Run debug-hook17:53
niemeyerkim0: and then run ensemble resolved with the --retry argument17:53
kim0niemeyer: hmm .. service unit is stuck somehow17:59
kim0here is status http://paste.ubuntu.com/616891/17:59
kim0I hope you don't mind all the questions 17:59
niemeyerkim0: Not at all.. I'm actually going to fix some of the issues you found today17:59
kim0yeah .. the basic workflow should be smoother ..18:00
kim0so, I had an error in a hook, now I have no idea how to nudge things and get them back18:01
niemeyerkim0: resolved, as I mentioned above18:01
kim0bin/ensemble resolved --retry drupal/118:02
kim0tried this18:02
niemeyerkim0: Ok, what happened next?18:02
kim0debug-log only shows mysql related messages18:02
kim0and status is the same18:02
niemeyerkim0: Have you actually fixed the original reason why your hook failed?18:03
kim0niemeyer: yes I did18:03
niemeyerkim0: Why was it failing before?18:04
kim0niemeyer: ssh'ed into the machine .. and ran it 18:04
kim0niemeyer: some cd to a non existent directoyy18:04
kim0niemeyer: I ran the script inside the instance .. it is fine now18:04
niemeyerkim0: Is it returning successfully now? (exit status 0)18:04
kim0checking again18:04
kim0can't really check again accurately18:06
kim0ensemble-log giving errors because it's running outside the environment18:06
kim0apt-get saying packages already installed ..etc18:06
kim0but yeah it seems correct18:06
niemeyerkim0: So how did you run it befor?18:07
niemeyere18:07
kim0niemeyer: in a debug-hooks session18:07
kim0/var/lib/ensemble/units/drupal-1/formula/hooks/install18:07
niemeyerkim0: If apt-get install is failing, it won't work as a hook either18:07
kim0it's just saying .. the package is already installed18:08
kim0the script is fine trust me :)18:08
niemeyerkim0: :)18:08
niemeyerkim0: If you have already executed it by hand, you can just say "resolved"18:09
niemeyerkim0: Without --retry18:09
niemeyerkim0: But I suspect that fuzzing may have triggered something else.. that "state: null" isn't really great 18:09
kim0yeah18:09
niemeyerkim0: Try the resolved trick18:09
kim0did that18:10
niemeyerkim0: This just states to Ensemble "I have resolved the problem"18:10
kim0still null18:10
niemeyerkim0: Ok, try redeploying the fixed formula then18:11
niemeyerkim0: We'll have to investigate a bit that scenario18:11
niemeyerkim0: (--retry with a broken script, etc)18:11
kim0how do I redeploy18:11
niemeyerkim0: But first, I'll fix the debug-hook stuff we debugged this morning18:12
kim0ok np ..18:12
niemeyerkim0: Same thing you did earlier?18:12
kim0I'll pick this up later18:12
kim0fresh environment .. ok18:12
kim0In the tutorial .. I'm assuming the formula is going to have errors18:13
niemeyerkim0: Nope18:13
niemeyerkim0: Just remove the unit18:13
niemeyerkim0: and add it again18:13
kim0ok18:13
niemeyerkim0: Yeah, that's a good thing18:13
niemeyerkim0: You can also upgrade the formula in general18:13
kim0says, error state cannot be upgraded18:13
niemeyerkim0: This is what we're preparing Ensemble to be able to do18:13
kim0or so18:14
niemeyerkim0: Error?  Change, upgrade..18:14
kim0says like, formula is in error state .. so it cannot be upgraded18:14
kim0I lost the exact message though18:14
niemeyerkim0: Yeah, you have to resolve it first..18:15
kim0Ok .. I'll need to try this again (recovering from a formula with errors )18:15
kim0and will discuss again with you18:15
niemeyerkim0: Because otherwise we can't assume a known state18:15
niemeyerkim0: Imagine an install hook failed in the middle18:15
kim0that's what it was :D18:16
kim0so I just need to know the recommended recovery steps18:16
niemeyerkim0: Right.. simply upgrading won't really yield a working system necessarily 18:16
niemeyerkim0: Because half of it executed18:16
kim0how to know what went wrong .. release a fix .. start recovering18:16
niemeyerkim0: What we want is this:18:17
niemeyerkim0: install failed: check logs, fix it or retry, upgrade if wanted18:17
niemeyerkim0: With debug-hook if desired, to understand what's going on18:18
kim0then use "resolved" right ?18:18
niemeyerkim0: Right, after the "fix it or retry"18:18
niemeyerkim0: Or during it actually.. retry is done with resolved18:18
kim0is there a way to upload the fixed new hook ?18:19
niemeyerkim0: upgrade-formula18:20
kim0which refuses to work in error state ?18:20
niemeyerkim0: Yes, which is the right thing to do18:20
kim0ok .. so I'd still need to upload my fixed hook18:21
niemeyerkim0: The error state must be acknowledged by the administrator18:21
niemeyerkim0: and if an install hook blows up in the middle, upgrading a new install hook with the error fixed won't necessarily make it work18:21
niemeyerkim0: mkdir foo, run twice, breaks18:22
kim0so our recommended approach is kill the instance, and start a fresh machine ?18:22
niemeyer<niemeyer> kim0: What we want is this:18:22
niemeyer<niemeyer> kim0: install failed: check logs, fix it or retry, upgrade if wanted18:22
niemeyer<niemeyer> kim0: With debug-hook if desired, to understand what's going on18:22
kim0the "fixing and trying" cycle is what I'm trying to grasp18:22
niemeyerkim0: Fixing it means fixing the actual problem within the formula..18:23
kim0and what about the trying18:23
niemeyerkim0: Sorry, within the service unit18:23
kim0on a new instance ?18:23
niemeyerkim0: If there's nothing to do.. you just run "resolved"18:23
kim0ah18:23
kim0so I fix the problem manually .. then run resolved18:24
niemeyerkim0: Yes, that's one way to do it18:24
niemeyerkim0: The other way to do it is to code an idempotent hook18:24
niemeyerkim0: This enables you to run resolved and upgrade a new formula18:24
kim0and use, resolved --retry18:24
kim0right ?18:24
niemeyerkim0: If that's what you want to do18:25
niemeyerkim0: The problem is really quite simple18:25
niemeyerkim0: When a hook fails, Ensemble will stop running hooks until the admin acknowledges it18:25
niemeyerkim0: If you run ensemble resolved, it forgets about the old hook, and continues execution18:26
niemeyerkim0: If you want to run the old hook again before continuing, you run resolved --retry18:26
niemeyerkim0: and that's it18:26
niemeyerkim0: Whether you upgrade the formula, change the hook in place to try things out, run debug-hook, run ensemble log, etc, is really up to you18:26
niemeyerkim0: We're coding tools to give you everything you need to understand how things are behaving18:27
niemeyerkim0: and fixing them18:27
kim0I guess the workflow I had in mind is .. install hook blows up .. I ssh into machine .. figure out why it blew up .. then I fix the hook *locally* .. then somehow ensemble would upload the new version and run that18:27
kim0but the workflow you explained is perfectly fine18:27
kim0thanks18:27
niemeyerkim0: Well, maybe there are further options we can develop around this18:28
kim0Yeah, recovering from broken formulas should be smooth .. since people are going to make all sorts of mistakes :D18:29
kim0niemeyer: thanks for all the explanation and patience :)18:29
niemeyerkim0: No worries18:29
niemeyerkim0: Good to talk about that stuff.. it's important to learn how other people feel about the system too18:29
* kim0 nods18:30
* SpamapS just discovered resolved yesterday btw18:45
SpamapSwould have saved me quite a few remove-relation/add-relation cycles ;)18:45
niemeyerSpamapS: Sorry about that :-)18:47
SpamapSYes shame on you guys for making the thing work welle nough to survive hundreds and hundreds of remove/adds.18:49
_mup_ensemble/close-zk-port r240 committed by gustavo@niemeyer.net18:50
_mup_Do not open zk port on AWS firewall.18:50
niemeyerSpamapS: Yeah, good thing we are in a polishing cycle.. :)18:51
_mup_Bug #791973 was filed: Ensemble shouldn't open the EC2 firewall for zk access <Ensemble:Confirmed> < https://launchpad.net/bugs/791973 >18:58
=== deryck is now known as deryck[lunch]
niemeyerhazmat:   sudo -u ubuntu screen -dmS $SESSION_NAME19:11
niemeyerhazmat: -u ubuntu?  Shouldn't this be root?19:11
niemeyerAlso, this command seems to create a new session, irrespective of whether there's an existing one with the same name19:12
hazmatits connecting to the ubuntu user's screen session from the login shell19:14
niemeyerhazmat: Yes, but isn't the ubuntu user connecting to root's screen using sudo?19:15
hazmatniemeyer, no its not that requires a setuid binary screen program19:15
niemeyerhazmat: Using sudo?19:15
hazmatniemeyer, that would be fine19:16
hazmati thought you where referring to multi-user screen19:16
niemeyerhazmat: ssh -t ubuntu@%s sudo byobu -xRS %s-hook-debug -t shell19:16
hazmatsounds good19:16
niemeyerhazmat: The debug-hook command connects a session from root19:16
niemeyerhazmat: Which means doing -u ubuntu would put the session in another place 19:17
niemeyerOk, I'll fix that as well19:17
niemeyerSo there's apparently no way to start a screen session unless it doesn't yet exist.. :(19:24
niemeyerOk, I'll give tmux a try..19:33
niemeyersmoser!19:38
niemeyersmoser: Was just reminding of you while hacking a shell script19:38
niemeyersmoser: exec &> foo.. that's an awesome trick I learned with you recently :)19:39
smoserthat is bash only19:39
smoserexec > foo 2>&119:39
smoserwould be the posix shell equivalent19:40
niemeyersmoser: Nice19:40
niemeyersmoser: Will use that19:40
niemeyerhazmat: If  a sigspec is EXIT (0) the command arg is executed on exit from the shell.19:53
niemeyerhazmat: Looks handy19:53
niemeyerhazmat: Sorry, that was a quote19:53
niemeyerWonder if that will *always* execute19:53
* niemeyer tests19:54
=== deryck[lunch] is now known as deryck
niemeyerYeah, works19:55
_mup_ensemble/expose-hook-commands r242 committed by jim.baker@canonical.com20:29
_mup_Implemented open-port, close-port hook commands20:29
jimbaker biab20:29
_mup_ensemble/debug-hook-fixes r240 committed by gustavo@niemeyer.net20:42
_mup_Fixed several issues in the debug-hook shell payload, and replaced20:42
_mup_screen with tmux to handle concurrent session creation without races.20:42
_mup_Let's see if this works in real test cases now.20:42
niemeyerWhat's the proper format to put ensemble-branch in the environment's file again?  I recall we had a weird issue with one of the url forms, and I killed my commented option by mistake.20:45
niemeyerjimbaker, hazmat, bcsaller: ?20:46
bcsallerniemeyer: ensemble-branch: lp:~bcsaller/ensemble/config-set-lifecycle20:46
niemeyerbcsaller: Does that work?  Nice, I think that was one of the formats which was not working20:47
bcsallerits been working for me20:47
niemeyerbcsaller: Super, thanks20:47
niemeyerbcsaller: It was a crazy issue we had in the sprint..  Launchpad was just barfing on https or http or lp, can't recall which one..20:48
SpamapSniemeyer: I'm thinking of uploading principia-tools to the ensemble ppa... thoughts before I do that?20:50
niemeyerSpamapS: No, it sounds good20:50
niemeyer2011-06-02 16:50:32,617 ERROR ProviderError: Interaction with machine provider failed: ConnectionTimeoutException('could not connect before timeout after 1 retries',)20:51
niemeyerFeels like a regression on the waiting behavior20:51
niemeyerkim0: You were right.. debug-hook needed some good debugging by itself21:23
_mup_ensemble/debug-hook-fixes r241 committed by gustavo@niemeyer.net21:40
_mup_- Add additional hook names to valid list on debug-hook.21:40
_mup_- Fix debug-hook shell template.21:40
=== negronjl_ is now known as negronjl
_mup_Bug #792071 was filed: relation-get blowing up badly during install hook <Ensemble:New> < https://launchpad.net/bugs/792071 >22:06
niemeyerObserving debug-hooks actually working is beautiful!22:16
niemeyerDo changes on one side, exit.. boom! The other side pops up!22:17
* niemeyer ponders about how to execute a script by piping it on stdin22:23
niemeyerHah, /bin/bash -22:24
kim0niemeyer: great news!22:58
kim0so it's working as it should now .. woohoo22:59
kim0niemeyer: Would you think it'd be better for debug-hooks to open the hook code in vim in the new screen window, instead of dropping me in a blank shell ?22:59
niemeyerkim0: Hmm23:03
niemeyerkim0: No, probably not.. this would likely pass the wrong idea about what you can do within the debug hooks session23:03
niemeyerkim0: It's useful to look at the script, but you're free to do pretty much anything23:04
kim0hmm23:04
kim0to debug the hook .. I had to figure out where it was23:04
kim0and for that I used "find /"23:04
kim0which sux ofc23:04
niemeyerkim0: Yeah, I noticed this as well23:05
bcsallerit should cd you into the formula directory I think23:05
niemeyerkim0: That's a failure in the hook execution logic23:05
bcsallerI think we have a bug for that 23:05
niemeyerkim0: Hooks should always be executed within the formula directory23:05
niemeyerkim0: When debugging or not23:05
niemeyerbcsaller: Hey!23:05
bcsaller:)23:06
kim0bcsaller: the cd into hooks dir, sounds like a good compromise .. is it planned23:06
bcsallerkapil and I agreed it was a good idea when we talked about it 23:06
niemeyerAgreed, that's important even for plain hooks23:07
niemeyerI mean, when executing the real ones rather than debugging23:07
_mup_ensemble/expose-hook-commands r243 committed by jim.baker@canonical.com23:11
_mup_Testing on args and logging for port commands23:11
niemeyerWoohay23:21
kim0expose merged ?23:31
niemeyerkim0: Not yet23:42
niemeyerjimbaker: Is hard at work on it23:42
_mup_ensemble/debug-hook-fixes r242 committed by gustavo@niemeyer.net23:46
_mup_- Use the real unit name as the session, since tmux is happy with that.23:46
_mup_- Send an initialization script with a simple tmux.conf when firing23:46
_mup_  ssh through the debug-hooks command.  Use screen shortcuts since23:46
_mup_  people will be happier with that.23:46
_mup_[WIP]23:46
niemeyerOkay, time to step out and do something else..23:47
niemeyerSee y'all tomorrow!23:47
jimbakerkim0, the expose work is getting close - hook commands are almost ready for review, i have most of the remaining provisioning work already done from a spike branch, and the ec2 group authorization model maps readily against what is necessary for a provider23:54
kim0jimbaker: sounds like great news .. rock on :)23:55
SpamapSHmm.. I've been thinking about proposing a specification for 'machine-info-get' .. Teyo from Puppet suggested that they'd be interested in collaborating on a library to collect info about the current machine.. and it would be really useful to have this...23:56
SpamapSSo I'm thinking the machine agent should have some of this information available.. some from the machine provider, some from this library23:57
SpamapSThat would solve the 'Whats my private IP? Whats my public IP?' case.23:58
SpamapSHow would I propose such a spec?23:58

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