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