/srv/irclogs.ubuntu.com/2012/07/12/#maas.txt

jtvDoes anyone know what goes wrong in juju here, and how it might relate to MAAS?  I'm completely lost in juju-land.  http://askubuntu.com/questions/162255/does-juju-really-need-two-nodes04:51
rvbaroaksoax: the provisioning server doesn't add /usr/share/maas to the path.  Can you modify the PYTHONPATH before you run that command?09:10
allenaprvba: Did you say that you'd had success with http://marcoceppi.com/2012/05/juju-maas-virtualbox/?09:57
rvbaallenap: no, I said it looked promising that's all :).09:58
marcoceppiIt's not the best way to experience MaaS unfortunately09:58
allenapmarcoceppi: Shamefully I haven't read it yet. I'm trying to help out with https://answers.launchpad.net/maas/+question/202414, but I don't have time (none of us do really) to try and reproduce the problem.10:05
marcoceppiIMO The best way to test MaaS is to just spin up the OpenStack DevScript thing. VirtualBox -> OpenStack (physical hardware) differs in experience10:07
marcoceppirather, test MaaS prior to production deployment10:07
hazmatis there any intent that maas supports additional constraints for 12.10?11:22
hazmatre juju provider constraints11:22
hazmatflacoste, Daviey ^11:22
roaksoaxrvba: howdy.. yeah I eventually figured it out :)11:41
roaksoaxjtv: juju requires a bootstrap node.. I guess smoser already clarified it for you11:42
smoserroaksoax is up early.11:42
roaksoaxsmoser: heh yeah :)11:42
jtvroaksoax: never mind — I had to punt the question.11:43
roaksoaxjtv: hehe ok :)11:43
roaksoaxrvba: did you submit a patch for that?11:43
rvbaroaksoax: for what? The PYTHONPATH thingy?11:44
roaksoaxrvba: yeah11:45
rvbaroaksoax: no I didn't.11:45
roaksoaxrvba: where would be the best place to add it?11:48
roaksoaxrvba: cause it seems it fails for the tftp stuff but doesn't fail for anything else11:48
rvbaroaksoax: it should be done where the packages run that twisted thingy I think.11:50
rvbapackage*11:50
roaksoaxallenap: could you please take care of that ^^ since you better understand this part of the code :)11:52
rvbaroaksoax: allenap will know better indeed.  But to me it looks like a packaging question.  I mean something that the package' script should set before running the daemon.11:55
roaksoaxrvba: right, so what worries me is that right before the tftp stuff was added, we didn't see celeryconfig import errors. As there is lots of other stuff that uses celeryconfig, such as the power stuff11:56
roaksoaxrvba: so this shouldn't not be failing to import celeryconfig11:56
roaksoaxerr s/shouldn't not/shouldn't/11:57
rvbaroaksoax: but that's a new daemon so it seems normal to tweak PYTHONPATH before running it, same as what you've done before running celeryd.11:58
roaksoaxrvba: right but that daemon is run by pserv itself11:58
roaksoaxrvba: and, correct me if I'm wrong, that daemon being run inside shouldn't it have the path already available?11:59
rvbaroaksoax: well, pserv didn't have any dependency on celeryconfig previously.  Now it does because of the tftp stuff.12:00
roaksoaxrvba: right, but my point being is that pserv also handles the power stuff too right? which means it imports celeryconfig and doesn't fail12:00
rvbaroaksoax: no, the power stuff is handled by celeryd.12:01
rvbaMAAS talks to celeryd to run the power-related celery tasks.12:01
roaksoaxrvba: right, so my point being is this: http://pastebin.ubuntu.com/1087834/12:02
roaksoaxrvba: so If I understand correctly, you are saying that celery handles the power, while ftp is a daemon started by pserv?12:03
rvbaroaksoax: allenap will confirm this (he's the only one who's worked on tftp so far) but yes, that's what I think.12:04
roaksoaxrvba: there's no variable that contains /usr/share/maas right?12:07
rvbaroaksoax: definitely not.12:08
roaksoaxrvba: so this should be the fix: http://paste.ubuntu.com/1087846/ right?12:09
rvbaOnly the packaging knows that thing will end up in /usr/share/maas.12:09
roaksoaxrvba: unless we have a varilable that defaults to it :)12:10
rvbaroaksoax: I think that this path modification operation should be done right before the process is started rather that in the code itself.12:13
rvbaroaksoax: It's the job of the caller to make sure that all the required stuff are present on the path.12:13
roaksoaxrvba: i think differently. I think if the daemon is run (pserv), everything that runs under it should know where the stuff it needs is located12:14
roaksoaxrvba: i should not need to tell it before running the daemon12:15
roaksoaxrvba: as in, this daemon should know where to look12:17
rvbaroaksoax: my point is that where things are located depends on the environment (dev environment, prod environment).  The process which runs the daemon has all the information to set up the environment properly.  It would duplicate the work to have the daemon itself try to guess where things it needs are location.12:17
rvbalocated*12:17
roaksoaxrvba: I agree that it depends on the environment, however, even in such environments, we should not need to manually tell it the PATHS, but rather it should be automatically determined IMHO12:18
roaksoaxsmoser: how would you handle something like this ^^12:19
rvbaroaksoax: look how we've done with the wsgi stuff: the caller (the wsgi script) was in charge of setting up the path.12:19
* smoser reads.12:20
roaksoaxrvba: i agree, but in this case you are starting a daemon under python itself, it does not have its own daemon12:21
roaksoaxrvba: that being said, given that that daemon is understed under another, then it should be able to know where everything is12:21
roaksoaxrvba: so for me it can be seen as a regression12:22
rvbaroaksoax: unless we didn't make celeryconfig.py available to pserv.  Because previously we didn't need to do that.  Now we do.12:22
roaksoaxrvba: right, so we need to make sure celery config is available for everyone that uses it without having to manually set the path12:23
roaksoaxrvba: it should rely on a place where everybody can use it, because that's the way how it is being used12:23
rvbaroaksoax: same as django's config, that contains MAAS specific information and should not be on the general path, it should only be added to the PYTHONPATH before we run pserv (or celeryd, but we already do that).12:24
roaksoaxrvba: what we do with celery, telling the pythonpath on upstart is a hack IMHO. Now, src/provisioningserver/tftp.py is the twisted app that needs to know where celeryd, so it is there where the path should be added12:27
roaksoaxrvba: at the end of the day, the thing is if someone installs from source, such as python setup.py install the app should be working without having to provide hacks for it12:28
roaksoaxrvba: so there should probably be a setting that tells where celeryconfig is12:28
smoseri don't really understand the problem above completely. but in general, i think its better to have config (or command line arguments) to an application to tell it where stuff is.12:29
smoseri really dont like relying on PYTHONPATH12:29
smoseras environment is hard to manage (as it by default is inherited across forks)12:29
smoserbut again, i dont really understand the detail. bug something like http://paste.ubuntu.com/1087846/ doesn't seem like a general program.  it seems like part of maas.12:30
rvbasmoser: so you agree that the caller should pass on the configuration information.  Rather than having the code try to guess where things are.12:31
rvbaWhether we use PYTHONPATH or not is another story.12:31
roaksoaxrvba: so yes I agree there should be asetting for that. I also think it should try to determine where it relies automatically12:32
roaksoaxrvba: in the case of wsgi.py, that is seen as a config file12:32
roaksoaxrvba: i have seen wsgi.py files trying to guess where the PATH is12:33
roaksoaxrvba: so if the setting is empty, there should be either a default, or a way to try to determine it automatically12:34
roaksoaxrvba: based on known install locations12:34
rvbaroaksoax: I confess that seems much more complex and error-prone than having the caller (which knows everything about the environment) pass on the right config or set up the right PYTHONPATH.12:35
rvbaAnd let me add that it's what we've done so far: wsgi.py, the prod caller script, set it up with the prod path.12:36
roaksoaxrvba: right, but in this the caller script is maasps.py12:36
rvbaThe dev script (services/webapp/run) set up it up with the dev PYTHONPATH12:36
rvbasets*12:37
smoserif we can, yeah, it makes sense to have default configs. and ideally an installed application isn't completely broken.12:37
smoserand one installed by ubuntu should not have to be told where it is installed to12:37
smoser(so that part of "automatic" i agree with)12:37
rvbaIt doesn't make sense to me to hard code platform-specific path in the code itself.  But I'm no expert so I'm ok to be told to do otherwise.12:38
roaksoaxrvba: so could pserv.yaml contain this information then?12:38
jtvI'm off, people.  See you tomorrow!12:39
roaksoaxrvba: but that's what happens in all software I've seen so far, you "hardcode" a location, but if a different installation location is selected, the software should know where it is12:39
rvbaroaksoax: that would work, because there is a pserv.yaml for the prod environment and another one for the dev environment.12:40
roaksoaxrvba: example of this is installing between different distributions. Some software might default to /usr/local/lib in RHEL for example, and in ubuntu we use /usr/lib/. So that software needs to know where its stuff ended up installing12:40
rvbaroaksoax: exactly, so something outside of the software should tell it where things are.  It's not the responsability of the software to try to guess the possible locations.12:41
roaksoaxrvba: I agree12:42
roaksoaxrvba: but IMHO, this case is different because its being run under PYTHONPATH "importing" a "python module"12:42
rvbaroaksoax: right, I admit that's a bit special.12:42
roaksoaxrvba: so we are in agreement then. I'd say pserv.yaml would probably be the best place to "change" the installation path then12:43
rvbaroaksoax: let's wait for allenap to come back and see what he thinks about that.  He's the one who decided to call the tftp stuff from within the code.12:43
roaksoaxrvba: ok12:44
allenapOkay, what's up?12:44
rvbaroaksoax: that makes sense, although I would still prefer to have those path modifications made by the process launching the initial process.12:44
allenapShall I just read the scrollback?12:44
rvbaallenap: yes12:44
* rvba grabs a bite.12:45
roaksoaxrvba: right, that would be telling upstart where pythonpath is12:45
rvbaroaksoax: yep.12:45
roaksoaxrvba: which I certainly trying to avoid12:46
rvbaroaksoax: I can see that :)12:46
roaksoaxrvba: cause it really is a hack12:46
roaksoaxrvba: in the case of celery is a must do12:46
rvbaroaksoax: may I ask why this is considered a hack?12:49
roaksoaxrvba: I think that the daemon should run, and if it does not find a config, it should fail12:54
roaksoaxrvba: celeryd imports a config as running a python script, which makes us tell it where the config is12:54
roaksoaxthe bad things is that we have to tweak the pythonpath12:54
roaksoaxin order for it to work12:54
roaksoaxwe shouldn't really need to tweak it, but rather simply tell it where the config is12:55
rvbaroaksoax: indeed, but it seems to be rather common for python-based software to use python modules as configuration files (see Django, celery).12:57
roaksoaxrvba: it does, but nobody is perfect :)12:57
rvbaroaksoax: and that doesn't tell me why it's bad to tweak the pythonpath.  Where tweak = add one item to it to tell the software where it's config is.12:58
rvbas/it's/its/12:58
rvbaChanging the pythonpath like this, in the context of a specific process seems pretty benign to me.12:58
rvbaBut maybe I'm missing the big picture.12:59
roaksoaxrvba: but yeah, from my personal point of view, having to tweak pythonpath for it to find the config, is a hack. It would be much simpler to tell where a config is, such as yaml, and let celery code import tha varilables and make then available ... I however, don't know anmythjing about celery so I wouldn't know why they preferred doing it that way12:59
roaksoaxrvba: so, from my point of view, telling where pythonpath is similar to running a chroot13:00
roaksoaxor to running an applicaion in a chroot,13:01
roaksoaxbut we are obviuoulsy not doing so13:01
rvbaroaksoax: agreed, using flat files (a la yaml) would be more clean.  But since we're dealing with framework which use python modules to store configuration options, we have to adapt to the way they work and tweak the pythonpath.13:02
roaksoaxrvba: indeed13:02
rvbaframeworks* even (Django + Celery)13:02
roaksoaxrvba: right, but in django, we basically tell wsgi where to start from where almost everything is is publicly available in pythonpath13:05
roaksoaxrvba: from "within" the application13:05
roaksoaxrvba: so we are adding a path for that particular "instance"13:05
roaksoaxrvba: while in celery, we are doing it "externally", from the upstart job13:06
rvbaI don't consider wsgi.py to be part of the application, it's really the equivalent of an upstart job from within apache.13:06
rvbaroaksoax: isn't an upstart job also a particular "instance"?13:07
smoserrvba, if i was looking to grab maas trunk and try to use it13:08
smoseris there any doc that covers that?13:08
smoseri'll just run it on an instance, so i dont care if i have to install stuff as root or whatever, just want to get the full path working as much as possible.13:09
roaksoaxsmoser: i have quantal maas working13:09
roaksoaxsmoser: you should be able to use it. I'm looking to update it today after this stuff gets fixed13:10
rvbasmoser: that's really something that is unsupported, untested and undocumented.  The only way to run MAAS from source is to run what we call the dev instance, with local services and a test database but you won't be able to deal with real nodes.13:11
roaksoaxrvba: it is too13:11
smoserrvba, ok. thats fine, but at least please realize that you just said "running this code is unsupported, untested and undocumented"13:12
smoseri literally laughed out loud. and i try not to do that on irc.13:12
rvbasmoser: no, that's not what I said.13:12
rvbasmoser: I'm sure there is a way to do that but it will require fiddling with the config a bit.  But we've always used the packaged version of MAAS to try things out with real nodes.13:13
czajkowskiif anyone can help the user who has asked a question on AU that would be great. http://askubuntu.com/questions/162255/does-juju-really-need-two-nodes13:16
rvbasmoser: we've designed the dev environment to be completely isolated from the rest of the system, so it's contradictory with actually dealing with real nodes.13:16
roaksoaxallenap: any thoughts?13:26
allenaproaksoax: I was otp; I'm just reading the scrollback now... and there's a *lot* of it.13:26
roaksoaxheheh13:35
roaksoaxrvba: where is it that twistd logged by default?13:39
allenaproaksoax, rvba: I haven't read everything, but... the tftp server (pserv as a whole) doesn't need access to the celeryconfig module. We should move the config out of that file. I just did it that way because it was already there.13:46
allenapPersonally I *hate* celeryconfig and DJANGO_SETTINGS_MODULE, but we have to live with the things.13:47
allenapI would like to define things like TFTPPATH in pserv.yaml, or a more general maas.yaml (does not exist), and then these config module aberrations can pull the config in from there.13:48
roaksoaxallenap: so tftppath.py will not import celeryconfig then?13:49
roaksoaxin the future?13:49
allenapAlso, pserv is all about Cobbler and, now, TFTP. The Cobbler stuff will go, and pserv will simply be a container for the TFTP server. We can also use it to host other Twisted services, but there aren't any others that need it right now.13:50
allenaproaksoax: No, we should get rid of that.13:50
roaksoaxallenap: ok, that's what I was asking :). Now, if pserv is in place, I think the tftproot should rely in pserv.yaml13:50
roaksoaxthe config option13:51
allenapceleryconfig *should* die, but celeryd needs it. IMO, we should put only enough in there for celeryd to start, then put MAAS specific config elsewhere.13:51
allenaproaksoax: Agreed.13:51
allenaproaksoax: I'll fix that now; I assume it's blocking you?13:51
roaksoaxallenap: I'm gonna provide a temporary patch for it to work now, but will remove once your fix is in trunk :)13:52
allenapCool.13:52
* allenap gives up hope of doing QA today ;)13:52
roaksoaxrvba: btw.. I think we can ditch 1 of the IPMI options from the UI and just keep IPMI lan13:52
rvbaroaksoax: I've got no problem with that.  As you know, they were simply stolen from cobbler.  If there is a good reason to merge two of the options into one, I'm fine with it.13:53
roaksoaxrvba: ok cool :) I'll re-verify (not an easy task with no ipmi devices to play with_13:54
roaksoaxDaviey: do we have any lab with IPMI that I can play with?13:55
roaksoaxerr13:55
roaksoaxrvba: so what do you think so far?14:06
roaksoaxrvba: http://paste.ubuntu.com/1088010/14:06
roaksoaxrobbiew: howdy!! so ipmi worked like a charm then... was it using the fulll template or the minimized one?14:06
rvbaroaksoax: I need to step out bit a bit, I'll have a look when I'll be back... in ~40 minutes.14:07
roaksoaxsure thanks!14:07
robbiewRoAkSoAx: full14:09
robbiewbut they didn't shutdown on a terminate-environment14:10
robbiewwhoops...destroy-environment14:10
roaksoaxrobbiew: alright! I'll look into that14:10
robbiewcool14:14
rvbarobbiew: I'm back.  That pastebin looks good to me.  I can give you a hand with writing the tests if you want.14:57
rvbaerr, roaksoax14:57
robbiewlol14:57
rvba:)14:57
robbiewtoo many r's14:57
rvbayep14:57
roaksoaxrvba: i already wrote them, they seem to "work" :)14:58
roaksoaxbut sure14:58
roaksoaxrvba: ok so in cobbler ipmilan uses fence_ipmilan while ipmi uses ipmitool directly15:04
roaksoaxrvba: fence_ipmilan requires ipmitool15:05
roaksoaxrvba: so I guess we could just stay with ipmitool15:06
rvbaroaksoax: do you know what fence_ipmilan adds to ipmitool?15:06
rvba(I'm just curious)15:06
roaksoaxrvba: that's what I'm actually looking for15:06
roaksoaxrvba: i'm guessing it was just created to be used in RHCS, isntead of using ipmitool directly15:07
roaksoaxrvba: i don't think it adds anything significant15:08
roaksoaxrvba: i, however, am thinking that we might need to add a box too allow sending extra commands15:09
roaksoaxallenap: still around?18:30
allenaproaksoax: Just back. What's up?19:18
roaksoaxallenap: i forgot :)19:19
allenapHaha :)19:19
roaksoaxallenap: still around? I remembered :)20:25
roaksoaxallenap: so I won't forget... did the maintainer pulled your changes yet?20:38
roaksoaxpython-tx-tftp20:39

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