=== zz_CyberJacob is now known as CyberJacob === CyberJacob is now known as zz_CyberJacob [08:56] hello, please is there any recommended way to backup (and restore) maas database? [08:57] i tried importing db dump bu i ended up with 2 clusters, one enabled but without nodes and second with existing nodes but unusable [11:20] http://askubuntu.com/questions/675240/post-request-using-python-maas-client [11:21] can anyone help me on this [11:21] ? [13:23] Bug #1235339 changed: Its hard to diagnose boot failures [13:23] Bug #1497991 opened: failed pxe boot causes system to local boot old deployment - node gets marked deployed [13:37] https://bugs.launchpad.net/maas-test/+bug/1498002 === jfarschman is now known as MilesDenver [13:51] good morning [13:51] binoy, let's take a look === marlinc_ is now known as marlinc [14:15] @kiko [14:15] Do you have any idea regarding this [14:17] binoy, the argument you are passing is a dict, but it needs to be a string [14:18] binoy, I'm not sure what /should/ be passed, though, I need to look at the code and haven't had a moment to [14:19] i tried to pass it as string [14:19] then also getting error [14:20] data = 'username=test&email=test@test.com&password=test&is_superuser=0' [14:20] like this [14:26] Bug #1498018 opened: storage layout should be presistent [14:36] binoy, http://askubuntu.com/questions/675240/post-request-using-python-maas-client/676680#676680 [14:36] binoy, see if that works [14:37] thank you @kiko [14:37] let me check it [14:41] binoy, sorry it took a while to get back to you [14:41] binoy, I just updated the answer with a link [14:42] binoy, if it works for you could you please accept it as I would like to dupe another question to it. [14:42] yes got it kiko [14:42] thanks [14:42] but we are getting another error now [14:42] Traceback (most recent call last): File "api.py", line 56, in 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/apiclien [14:42] binoy, could you put the full traceback into a paste, i.e. paste.ubuntu.com? [14:43] ok [14:44] http://paste.ubuntu.com/12514596/ [14:46] @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 REQUEST [14:46] and if it is 'is_superuser': False then the error is AssertionError: u'is_superuser' is unrecognised: False [14:47] binoy, when you get BAD REQUEST could you check your server logs for the traceback? [14:47] binoy, it needs to be a string AFAIK [14:48] i checked in the server logs [14:48] binoy, the right form is '0' based on the API docs [14:48] https://maas.ubuntu.com/docs/api.html#users [14:49] kiko yes [14:49] but still error :( [14:50] not getting much info from the /var/log/maas [14:51] odd [14:52] :( [14:52] binoy, ah [14:53] binoy, try supplying the data content as unicode [14:53] ok [14:57] kiko data = {'username':u'murali', 'email':u'muralidharan.s@poornam.com', 'password':u'murali', 'is_superuser': '0'} [14:58] this will be fine right [15:04] kiko data = {u'username': u'test', u'is_superuser': u'0', u'password': u'test', u'email': u'test@test.com'} [15:04] this also throwing the error as " raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: BAD REQUEST" [15:34] binoy, I wonder, what does your apache error log say? [15:39] binoy, what version of MAAS are you using, incidentally? [16:00] @kiko I am using maas 1.7 [16:02] Error.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] access.log ==> 127.0.0.1 - - [21/Sep/2015:21:31:43 +0530] "GET /MAAS/rpc/ HTTP/1.0" 200 498 "-" "Twisted PageGetter" [16:02] nope [16:02] none of that is relevant [16:03] where's the POST? [16:03] regarding post no error logs available [16:03] but the post is being made, or else you wouldn't be getting a 400 back [16:03] yes [16:04] POST is being made [16:04] When i try with the python debugger it seems its calling the post method [16:04] binoy, you would need to debug on the server side [16:04] the client thinks it is is doing everything fine [16:04] binoy, if you omit the "new" method, does it make a difference? [16:05] yes [16:05] will give the o/p [16:06] Sorry , no difference is being made with and without new [16:07] raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: BAD REQUEST [16:07] in both case [16:09] binoy, what are you executing? [16:09] can i give my file to check [16:09] binoy, just the line where you are issuing the post() [16:10] ok [16:10] maas_access.post(u"users/", "", **data) [16:10] binoy, just omit the second argument [16:10] i.e. [16:10] maas_access.post('users', **data)? [16:10] does that work? [16:10] no [16:11] okay [16:11] if do so then [16:11] maas_access.post(u"users/", **data) TypeError: post() takes at least 3 arguments (2 given) [16:11] hmm [16:11] argument error [16:11] that's odd [16:11] iam using maas 1.7 [16:11] is that make pblm ? [16:12] it's strange.. I'm not sure whether there should be an operation or not [16:14] @kiko http://paste.ubuntu.com/12515098/ [16:15] here is my code [16:28] binoy, if you pass op=None does that work? [16:28] you mean as second parameter [16:28] ? [16:29] yes [16:29] "users/", None, **data [16:29] if ' ' in s: TypeError: argument of type 'NoneType' is not iterable [16:31] binoy, try op="POST"? [16:32] ok [16:33] kiko, no luck [16:33] urllib2.HTTPError: HTTP Error 400: BAD REQUEST [16:33] binoy, thanks. [16:33] :( [16:36] binoy: try op="create" [16:37] maas_access.post(u"users/", "create", **data) [16:37] right ? [16:38] http://paste.ubuntu.com/12515272/ [16:47] kiko can you please check this http://paste.ubuntu.com/12515272/ [16:49] no luck @blake_r [20:41] Is 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? [23:49] Bug #1498221 opened: Subnet API should provide summary information regarding IPv4 address allocation [23:49] Bug #1498224 opened: As a MAAS administrator, I want to ask MAAS to reserve N arbitrary addresses in a Subnet or Space [23:55] Bug #1498221 changed: Subnet API should provide summary information regarding IPv4 address allocation [23:55] Bug #1498224 changed: As a MAAS administrator, I want to ask MAAS to reserve N arbitrary addresses in a Subnet or Space