/srv/irclogs.ubuntu.com/2015/09/21/#maas.txt

=== zz_CyberJacob is now known as CyberJacob
=== CyberJacob is now known as zz_CyberJacob
yaManhello, please is there any recommended way to backup (and restore) maas database?08:56
yaMani tried importing db dump bu i ended up with 2 clusters, one enabled but without nodes and second with existing nodes but unusable08:57
binoyhttp://askubuntu.com/questions/675240/post-request-using-python-maas-client11:20
binoycan anyone help me on this11:21
binoy?11:21
mupBug #1235339 changed: Its hard to diagnose boot failures <debugging> <MAAS:Invalid> <https://launchpad.net/bugs/1235339>13:23
mupBug #1497991 opened: failed pxe boot causes system to local boot old deployment - node gets marked deployed <MAAS:Triaged> <https://launchpad.net/bugs/1497991>13:23
binoyhttps://bugs.launchpad.net/maas-test/+bug/149800213:37
=== jfarschman is now known as MilesDenver
kikogood morning13:51
kikobinoy, let's take a look13:51
=== marlinc_ is now known as marlinc
binoy@kiko14:15
binoyDo you have any idea regarding this14:15
kikobinoy, the argument you are passing is a dict, but it needs to be a string14:17
kikobinoy, I'm not sure what /should/ be passed, though, I need to look at the code and haven't had a moment to14:18
binoyi tried to pass it as string14:19
binoythen also getting error14:19
binoydata = 'username=test&email=test@test.com&password=test&is_superuser=0'14:20
binoylike this14:20
mupBug #1498018 opened: storage layout should be presistent <storage> <MAAS:Triaged by blake-rouse> <https://launchpad.net/bugs/1498018>14:26
kikobinoy, http://askubuntu.com/questions/675240/post-request-using-python-maas-client/676680#67668014:36
kikobinoy, see if that works14:36
binoythank you @kiko14:37
binoylet me check it14:37
kikobinoy, sorry it took a while to get back to you14:41
kikobinoy, I just updated the answer with a link14:41
kikobinoy, if it works for you could you please accept it as I would like to dupe another question to it.14:42
binoyyes got it kiko14:42
kikothanks14:42
binoybut we are getting another error now14:42
binoyTraceback (most recent call last):   File "api.py", line 56, in <module>     maas_access.post(u"users/", "new", **data)   File "/usr/lib/python2.7/dist-packages/apiclient/maas_client.py", line 248, in post     path, kwargs, as_json=as_json)   File "/usr/lib/python2.7/dist-packages/apiclient/maas_client.py", line 222, in _formulate_change     body, headers = encode_multipart_data(params, {})   File "/usr/lib/python2.7/dist-packages/apiclien14:42
kikobinoy, could you put the full traceback into a paste, i.e. paste.ubuntu.com?14:42
binoyok14:43
binoyhttp://paste.ubuntu.com/12514596/14:44
binoy@kiko, when i tried with  'is_superuser': 'False' and  'is_superuser': '0' Getting the error as     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: BAD REQUEST14:46
binoyand if it is  'is_superuser': False then the error is AssertionError: u'is_superuser' is unrecognised: False14:46
kikobinoy, when you get BAD REQUEST could you check your server logs for the traceback?14:47
kikobinoy, it needs to be a string AFAIK14:47
binoyi checked in the server logs14:48
kikobinoy, the right form is '0' based on the API docs14:48
kikohttps://maas.ubuntu.com/docs/api.html#users14:48
binoykiko yes14:49
binoybut still error :(14:49
binoynot getting much info from the /var/log/maas14:50
kikoodd14:51
binoy:(14:52
kikobinoy, ah14:52
kikobinoy, try supplying the data content as unicode14:53
binoyok14:53
binoykiko data = {'username':u'murali', 'email':u'muralidharan.s@poornam.com', 'password':u'murali', 'is_superuser': '0'}14:57
binoythis will be fine right14:58
binoykiko data =  {u'username': u'test', u'is_superuser': u'0', u'password': u'test', u'email': u'test@test.com'}15:04
binoythis also throwing the error as " raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: BAD REQUEST"15:04
kikobinoy, I wonder, what does your apache error log say?15:34
kikobinoy, what version of MAAS are you using, incidentally?15:39
binoy@kiko I am using maas 1.716:00
binoyError.log => [Mon Sep 21 13:20:01.847686 2015] [mpm_event:notice] [pid 3180:tid 139884346333056] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations [Mon Sep 21 13:20:01.847717 2015] [core:notice] [pid 3180:tid 139884346333056] AH00094: Command line: '/usr/sbin/apache2'16:02
binoyaccess.log ==> 127.0.0.1 - - [21/Sep/2015:21:31:43 +0530] "GET /MAAS/rpc/ HTTP/1.0" 200 498 "-" "Twisted PageGetter"16:02
kikonope16:02
kikonone of that is relevant16:02
kikowhere's the POST?16:03
binoyregarding post no error logs available16:03
kikobut the post is being made, or else you wouldn't be getting a 400 back16:03
binoyyes16:03
binoyPOST is being made16:04
binoyWhen i try with the python debugger it seems its calling the post method16:04
kikobinoy, you would need to debug on the server side16:04
kikothe client thinks it is is doing everything fine16:04
kikobinoy, if you omit the "new" method, does it make a difference?16:04
binoyyes16:05
binoywill give the o/p16:05
binoySorry , no difference is being made with and without new16:06
binoy    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: BAD REQUEST16:07
binoyin both case16:07
kikobinoy, what are you executing?16:09
binoycan i give my file to check16:09
kikobinoy, just the line where you are issuing the post()16:09
binoyok16:10
binoymaas_access.post(u"users/", "", **data)16:10
kikobinoy, just omit the second argument16:10
kikoi.e.16:10
kikomaas_access.post('users', **data)?16:10
kikodoes that work?16:10
binoyno16:10
kikookay16:11
binoyif do so then16:11
binoy    maas_access.post(u"users/", **data) TypeError: post() takes at least 3 arguments (2 given)16:11
kikohmm16:11
binoyargument error16:11
kikothat's odd16:11
binoyiam using maas 1.716:11
binoyis that make pblm ?16:11
kikoit's strange.. I'm not sure whether there should be an operation or not16:12
binoy@kiko http://paste.ubuntu.com/12515098/16:14
binoyhere is my code16:15
kikobinoy, if you pass op=None does that work?16:28
binoyyou mean as second parameter16:28
binoy?16:28
kikoyes16:29
kiko"users/", None, **data16:29
binoy    if ' ' in s: TypeError: argument of type 'NoneType' is not iterable16:29
kikobinoy, try op="POST"?16:31
binoyok16:32
binoykiko, no luck16:33
binoyurllib2.HTTPError: HTTP Error 400: BAD REQUEST16:33
kikobinoy, thanks.16:33
binoy:(16:33
blake_rbinoy: try op="create"16:36
binoymaas_access.post(u"users/", "create", **data)16:37
binoyright ?16:37
binoyhttp://paste.ubuntu.com/12515272/16:38
binoykiko can you please check this http://paste.ubuntu.com/12515272/16:47
binoyno luck @blake_r16:49
ennobleIs there a way to get MaaS to install to a particular type of media (e.g. HD vs SSD vs NVMe) or a particular device?20:41
mupBug #1498221 opened: Subnet API should provide summary information regarding IPv4 address allocation <networking> <MAAS:In Progress by mpontillo> <https://launchpad.net/bugs/1498221>23:49
mupBug #1498224 opened: As a MAAS administrator, I want to ask MAAS to reserve N arbitrary addresses in a Subnet or Space <networking> <MAAS:Triaged> <https://launchpad.net/bugs/1498224>23:49
mupBug #1498221 changed: Subnet API should provide summary information regarding IPv4 address allocation <networking> <MAAS:In Progress by mpontillo> <https://launchpad.net/bugs/1498221>23:55
mupBug #1498224 changed: As a MAAS administrator, I want to ask MAAS to reserve N arbitrary addresses in a Subnet or Space <networking> <MAAS:Triaged> <https://launchpad.net/bugs/1498224>23:55

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