/srv/irclogs.ubuntu.com/2014/02/03/#juju-dev.txt

=== dspiteri is now known as Guest30044
=== bigjools is now known as 21WACCDQH
=== jam is now known as Guest86076
=== Guest86076 is now known as jam21
=== jam21 is now known as jam1
rogpeppe2mornin' all08:09
=== rogpeppe2 is now known as 16WAALSO4
=== 16WAALSO4 is now known as rogpeppe
=== niemeyer is now known as 45PABCUAQ
=== bradm is now known as 5EXAAH0BV
=== wallyworld is now known as Guest64110
=== benji is now known as Guest23911
=== gary_poster|away is now known as gary_poster
=== Guest23911 is now known as benji
rogpeppecan anyone else bootstrap the local environment using trunk?14:02
rogpeppei get "restart: Unknown job: rsyslog" in /home/rog/.juju/local/log/cloud-init-output.log14:04
=== dstroppa_ is now known as dstroppa
=== rogpeppe is now known as rogpeppe1
=== rogpeppe1 is now known as rogpeppe
rogpeppe_thumper_: hiya14:19
_thumper_oh hai14:19
rogpeppe_thumper_: the local provider seems broken for me currently on trunk BTW14:19
_thumper_awesome14:19
rogpeppe_thumper_: i can't get it to bootstrap at all14:19
_thumper_wasn't me14:19
=== _thumper_ is now known as thumper
thumperhow are you bootstrapping?14:19
rogpeppethumper: juju bootstrap -e local --debug14:20
thumperthat should work14:20
rogpeppethumper: indeed :-)14:20
thumperwhat's the error?14:20
rogpeppethumper: 2014-02-03 14:10:34 ERROR juju.cmd supercommand.go:294 exit status 114:21
rogpeppe:-)14:21
thumperthat sounds very familiar14:21
thumperI think I hit that too14:21
* thumper thinks14:21
rogpeppethumper: looking in cloud-init-output.log, i see this:14:21
rogpepperestart: Unknown job: rsyslog14:22
rogpeppethumper: which i think is probably the cause14:22
thumperwat?14:22
thumperyou should have rsyslog running14:22
thumperit is part of the OS14:22
thumpersudo status rsyslog14:22
rogpeppethumper: status: Unknown job: rsyslog14:23
natefinchwell there's you're problem14:23
natefinchyour14:23
thumperhaha14:23
thumperrogpeppe: go14:23
thumpersudo start rsyslog14:23
thumperunknown job14:23
thumper?14:23
rogpeppethumper: yeah14:24
thumperdo you have rsyslog installed?14:24
rogpeppestart: Unknown job: rsyslog14:24
rogpeppethumper: yes14:24
rogpeppethumper: and there's a /etc/rsyslog.d directory14:24
rogpeppethumper: containing a 25-juju-rog-local.conf file14:24
thumperrogpeppe: is there /etc/init/rsyslog.conf?14:24
rogpeppethumper: yes14:25
thumperplz run rsyslog14:25
thumpersudo start rsyslog14:25
rogpeppethumper: that doesn't work, as i pasted above14:25
thumperum...14:25
thumperbollocks14:25
thumperit is lying14:26
rogpeppethumper: i could try running rsyslogd directly, i suppose14:26
thumperI wouldn't14:26
thumperupstart should start it14:26
thumperactually14:26
thumperyes14:26
thumperrun it manually14:26
thumperif it is failing to start, it should tell you why14:26
thumperbut rsyslog should be running14:26
rogpeppethumper: rsyslogd is already running14:27
thumperbut upstart doesn't think so?14:28
thumperthat's problematic14:28
rogpeppethumper: initctl --list doesn't list it14:28
rogpeppethumper: but service --status-all does14:28
thumperyou need help from someone that understands14:28
* rogpeppe doesn't know how initctl (upstart) and service interact14:28
thumperthe fundamental problem is that "sudo restart rsyslog" fails14:29
rogpeppethumper: yeah14:29
* rogpeppe straces start rsyslog14:30
rogpeppei suppose it might just be trusty brokenness14:32
natefinchrogpeppe: works for me on trusty, but maybe there's something else going on14:33
rogpeppeha, this is interesting:14:34
rogpeppe% sudo initctl --system start rsyslog14:34
rogpeppeinitctl: Job is already running: rsyslog14:34
rogpeppe% sudo initctl start rsyslog14:34
rogpeppeinitctl: Unknown job: rsyslog14:35
natefinch*twilight zone music*14:35
rogpeppe"initctl --system list" prints loads more jobs14:35
rogpeppei wonder what the default, without --system, is doing14:36
rogpeppeperhaps i've got two /etc/init instances running14:37
rogpeppehmm, i have14:37
rogpeppe/sbin/init and init --user14:38
rogpeppei bet that's the issue here14:38
rogpeppethe init --user is started by lightdm, whatever that is14:39
* rogpeppe googles it14:39
rogpeppei wonder if it's related to this: http://lwn.net/Articles/547422/14:40
rogpeppenatefinch: have you also got an "init --user" process running?14:42
natefinchrogpeppe:  looking14:43
natefinchrogpeppe: how can I see what the actually command line was?14:44
rogpeppenatefinch: i did "ps alxw | grep init"14:44
natefinchrogpeppe: yep, I have both14:44
rogpeppenatefinch: hmm, and "initctl list" and "initctl --system list" print the same thing for you?14:45
natefinchrogpeppe: the --system one lists a hell of a lot more, if that's what you mean14:46
rogpeppenatefinch: right14:46
rogpeppenatefinch: what's the output of "initctl list" for you?14:46
natefinchrogpeppe: http://pastebin.ubuntu.com/6867463/14:47
rogpeppenatefinch: and "initctl start rsyslog" works for you?14:48
rogpeppenatefinch: sorry, sudo initctl start rsyslog, of course14:48
natefinchrogpeppe:  I was gonna say, not without sudo.... yes, with sudo it works fine14:48
rogpeppenatefinch: weird14:49
rogpeppenatefinch: what's the output of "sudo strace initctl start rsyslog" for you?14:49
natefinchrogpeppe: http://pastebin.ubuntu.com/6867473/14:50
rogpeppenatefinch: thanks14:51
natefinchrogpeppe: welcome.  Gotta step away from the keyboard for a bit.14:51
rogpeppenatefinch: k14:51
rogpeppenatefinch: interesting, yours is opening a different unix socket from mine14:54
rogpeppenatefinch: yours opens /com/ubuntu/upstart; mine opens /com/ubuntu/upstart-session/1000/373014:54
=== vds` is now known as vds
rogpeppenatefinch: issue solved15:12
rogpeppelocal environment bootstrapped, phew15:13
* rogpeppe gets lunch15:36
rogpeppenatefinch: does the local provider work for you (on tip) ?16:15
rogpeppenatefinch: i can bootstrap, but not call juju status after that16:15
natefinchrogpeppe:  lemme try16:22
rogpeppenatefinch: thanks16:22
=== Makyo is now known as Guest92118
natefinchrogpeppe: ug, annoying.... evidently we now have a check to make sure mongod is in /usr/bin/mongod?  That's not where my mongo is :/16:26
rogpeppenatefinch: ha ha16:26
natefinchrogpeppe: I can symlink it, but still, annoying16:26
rogpeppenatefinch: does it work if you symlink it16:26
rogpeppe?16:26
natefinchrogpeppe: we'll see16:26
natefinchrogpeppe: sonofa.... man, we gotta fix the local provider.  It's so so so configuration specific.  I forgot it always has problems building jujud because root doesn't have go in its path16:32
rogpeppenatefinch: you shouldn't run it with sudo now16:32
natefinchrogpeppe: tried that first - ERROR juju supercommand.go:282 bootstrapping a local environment must be done as root16:33
rogpeppenatefinch: what revision are you using?16:34
natefinchrogpeppe: tip.. just pulled and everything16:34
rogpeppenatefinch: i suspect you haven't go installed everything16:34
rogpeppenatefinch: because on my machine (rev 2291) it works ok16:35
natefinchrogpeppe: what besides juju do I need to go install?16:35
natefinchcmd/juju tha tis16:35
rogpeppenatefinch: i generally do go install ./cmd/...16:35
rogpeppenatefinch: or everything16:35
natefinchrogpeppe: ok, good to know16:36
natefinchrogpeppe: that'll probably fix the "can't build jujud" thing16:37
rogpeppenatefinch: maybe16:37
rogpeppenatefinch: the local provider has a very weird way of finding jujud16:37
rogpeppenatefinch: it finds juju and then looks in the same directory as that for jujud16:38
rogpeppenatefinch: so unless they're in the same directory, it won't work16:38
natefinchrogpeppe: yeah that fixed the "need sudo" problem and thus it was able to build jujud, even though it shouldn't have needed to, since it's in the path16:38
natefinchrogpeppe: spoke too soon... still ends with needs root16:38
rogpeppenatefinch: so... can you run "juju status" successfully now?16:38
natefinchrogpeppe: I can't bootstrap still16:39
rogpeppenatefinch: are you absolutely sure you're running the right juju binary? (perhaps put a logger.Infof in localEnviron.Bootstrap to make sure)16:40
rogpeppenatefinch: in the code i see, it calls ensureNotRoot to make sure that you are not running as root16:40
natefinchrogpeppe: ahh, no, there's a juju in /bin/juju somehow16:40
rogpeppenatefinch: right16:40
natefinchrogpeppe: I don't know how that got there16:40
rogpeppenatefinch: when was it created?16:41
rogpeppenatefinch: hmm, /bin, not /usr/bin ?16:41
natefinchrogpeppe: yeah, just /bin/juju  .... created Dec 5th16:41
rogpeppenatefinch: weird.16:42
natefinchyep16:42
rogpeppenatefinch: well, remove it :-)16:42
natefinchwtf?  Why is bash still trying to run juju from /bin/juju if which juju returns $GOPATH/bin/juju?16:43
rogpeppenatefinch: run hash -r16:45
rogpeppenatefinch: it's an ancient (and fucked up) shell misfeature16:45
natefinchrogpeppe: yeah, I just made a new terminal and it's fine16:45
rogpeppenatefinch: and the source of endless wtfs in the past16:45
rogpeppenatefinch: it's a premature optimisation16:46
natefinchman, that is dumb16:46
natefinchrogpeppe: I mean, I get it, but.... yeah16:46
rogpeppenatefinch: blame csh back in the 80s16:47
natefinchrog ERROR juju.cmd supercommand.go:294 Get http://10.0.3.1:8040/provider-state: dial tcp 10.0.3.1:8040: connection refused16:47
rogpeppenatefinch: you're best deleting any existing stuff. rm -r ~/.juju/environments/local.jenv ~/.juju/local16:49
rogpeppenatefinch: that behaviour will get better, hopefully16:49
rogpeppenatefinch: axw has a CL waiting16:49
natefinchrogpeppe: and finally... it seems to work fine16:50
natefinchrogpeppe: juju status that is .... er, agent state is down, hmm16:50
rogpeppenatefinch: juju status works ok, not running as root?16:50
natefinchrogpeppe: I was too quick for it, now it's up.   Yes, not running as root16:51
rogpeppenatefinch: i get this: ERROR failed getting all instances: error executing "lxc-ls": lxc: Permission denied - opendir on lxcpath; Traceback (most recent call last):;   File "/usr/bin/lxc-ls", line 200, in <module>;     for container_name in lxc.list_containers(config_path=lxcpath):;   File "/usr/lib/python3/dist-packages/lxc/__init__.py", line 390, in list_containers;     config_path=config_path); ValueError: failure to list containers16:51
natefinchrogpeppe: what happens if you just run lxc-ls?16:52
rogpeppenatefinch: yeah, just tried that - that fails too16:52
natefinchrogpeppe: that works for me (well, returns with no output, since I have no containers yet)16:52
rogpeppenatefinch: it would be wonderful if it actually printed the path in question :-)16:53
natefinchrogpeppe: that's one of the things I like best about go... all those type of errors actually include the path16:54
rogpeppenatefinch: ah, i guess i've found the reason16:56
rogpeppenatefinch: /var/lib/lxc is mode 70016:56
natefinchrogpeppe: uhh.... that does seem like a problem :)16:57
rogpeppenatefinch: and... now it works16:57
rogpeppenatefinch: i wonder how that happened16:57
natefinchrogpeppe: actually, mine is also 70016:58
rogpeppenatefinch: oh, maybe i shouldn't have chmodded mine then16:58
rogpeppesigh16:58
rogpeppeWTFs/minute is running rather high currently17:02
=== Guest92118 is now known as Makyo
=== manu is now known as seelaman
natefinchrogpeppe: got a second? I have a question about the simpleworker that you wrote...18:47
rogpeppenatefinch: sure18:47
* rogpeppe tries to remember what "simpleworker" was18:47
natefinchrogpeppe:  I can pastbin18:47
rogpeppenatefinch: please18:47
natefinchrogpeppe: http://pastebin.ubuntu.com/6868675/18:48
rogpeppenatefinch: ah yes, i remember now18:49
rogpeppenatefinch: it is perhaps a little over-simplistic18:49
rogpeppenatefinch: it might need to cache the error, for example18:49
natefinchrogpeppe: the kill function, as written, doesn't compile, but I'm not clear on what is supposed to be there18:50
rogpeppenatefinch: close(w.stopc)18:50
natefinchrogpeppe: ok... I was trying to follow it, but it was all a little too self-referential and relying on the behavior of outside stuff that I didn't understand18:51
rogpeppenatefinch: it's just a way of writing a lightweight worker without making a new type18:52
rogpeppenatefinch: i should probably have written some comments :-)18:52
natefinchrogpeppe: heh...18:54
rogpeppenatefinch: this is probably a little better: http://play.golang.org/p/zGQUsdR5Yy18:58
rogpeppenatefinch: (it makes both Wait and Kill idempotent)18:59
natefinchrogpeppe: so in that code, the fact that done is a channel doesn't really matter, right?  Since nothing is ever sent on it, it just makes Wait() block until done is closed19:05
rogpeppenatefinch: that's right19:05
rogpeppenatefinch: it's a fairly idiomatic use of a chan struct{}19:06
natefinchrogpeppe: yeah. I19:08
natefinchrogpeppe: I'm a little confused, because stopc is never used19:09
natefinchrogpeppe: I mean, we send it to the function, but we don't send or receive on it ourselves19:09
rogpeppenatefinch: that's the point19:09
rogpeppenatefinch: the function can use it to find out when it's being stopped19:09
natefinchrogpeppe: oh, I see, I missed that we're still closing it.  ok19:10
rogpeppenatefinch: and ISTR that the code i pasted to did19:10
rogpeppes/pasted to did/pasted did that/19:11
natefinchrogpeppe: yeah.... ok. It's making more sense now.  your new code is a little easier for me to follow19:13
rogpeppenatefinch: the comments help, right?19:13
rogpeppenatefinch: (the code is actually more complex than it was before)19:13
natefinchrogpeppe: I think it was mostly the    w.done <- start(w.stopc)      line of the old code that was confusing me... calling a function passed into this function in a goroutine, passing it a channel and sending what that function returns into another channel....19:15
natefinchrogpeppe: cognitively dense19:16
natefinchrogpeppe: knowing that I can just ignore the channels except as signaling devices also helped19:17
rogpeppenatefinch: good thing we're not using haskell :-)19:17
natefinchrogpeppe: I'd be working somewhere else if we did :)19:17
* rogpeppe finishes for the day19:23
rogpeppenatefinch: g'night19:23
natefinchrogpeppe: g'night.  Thanks for the help.19:24
=== adam_g` is now known as adam_g
=== BradCrittenden is now known as bac
=== _mup__ is now known as _mup_
=== dspiteri is now known as DarrenS
=== 21WACCDQH is now known as bigjools
=== 5EXAAH0BV is now known as bradm

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