Comment 1 for bug 1075597

Revision history for this message
Raphaƫl Badin (rvb) wrote : Re: maas-cli commands not working. Returns a http 302 error

I managed to recreate the problem (using the package in the daily ppa):

maas-cli login maas http://127.0.0.1/MAAS/api/1.0/ creds:creds:creds
maas-cli maas node-groups list => returns the HTLM content of the login page

From apache's access log:
127.0.0.1 - - [06/Nov/2012:15:33:31 +0000] "GET /MAAS/api/1.0/describe/ HTTP/1.1" 200 6050 "-" "Python-httplib2/0.7.4 (gzip)"
127.0.0.1 - - [06/Nov/2012:15:33:42 +0000] "GET /MAAS/MAAS/api/1.0/nodegroups/?op=list HTTP/1.1" 302 322 "-" "Python-httplib2/0.7.4 (gzip)"

The problem is the URL used to fetch the list of the nodegroups; it contains a duplicated prefix: '/MAAS/MAAS/'.
Here is the content of /MAAS/api/1.0/describe/: http://paste.ubuntu.com/1337566/
The 'path' field of the handlers seems fine but the 'uri' field contains '/MAAS/MAAS'.

This seems to be a very recent problem and the last change I can think of in this area is https://code.launchpad.net/~allenap/maas/api-uri-bug-1059645/+merge/132527. Probably worth a look.