Comment 4 for bug 2009186

Revision history for this message
Nobuto Murata (nobuto) wrote (last edit ):

Looks it's purely on the client side.

EDIT: it looks like cached endpoint information on the client.

$ rm ~/.maascli.db
$ grep -a -o http://192.168.12.19:5240/MAAS/api/2.0/version/ ~/.maascli.db
grep: .maascli.db: No such file or directory

$ maas login admin http://192.168.12.19:80/MAAS/api/2.0/ gqG3GBeepxPaaHcRPQ:ZAtMA4XXJ4WnqkNTG9:MnczDFaPSs4tKZnV8zWLBnd3SKwNa79v
connect: (192.168.12.19, 80) ************
send: b'GET /MAAS/api/2.0/users/?op=whoami HTTP/1.1\r\nHost: 192.168.12.19\r\nauthorization: OAuth oauth_nonce="10113373905774274851677893418", oauth_timestamp="1677893418", oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="gqG3GBeepxPaaHcRPQ", oauth_token="ZAtMA4XXJ4WnqkNTG9", oauth_signature="%26MnczDFaPSs4tKZnV8zWLBnd3SKwNa79v"\r\nuser-agent: Python-httplib2/0.14.0 (gzip)\r\naccept-encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx/1.18.0 (Ubuntu)
header: Date: Sat, 04 Mar 2023 01:30:18 GMT
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 172
header: Connection: keep-alive
header: Vary: Authorization, Cookie
header: X-Maas-Api-Hash: 7b01cae71568bea2f250e94d09454b13888f04fb
header: X-Frame-Options: SAMEORIGIN
connect: (192.168.12.19, 80) ************
send: b'GET /MAAS/api/2.0/describe/ HTTP/1.1\r\nHost: 192.168.12.19\r\nuser-agent: Python-httplib2/0.14.0 (gzip)\r\naccept-encoding: gzip, deflate\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: nginx/1.18.0 (Ubuntu)
header: Date: Sat, 04 Mar 2023 01:30:18 GMT
header: Content-Type: application/json
header: Content-Length: 527323
header: Connection: keep-alive
header: X-Frame-Options: SAMEORIGIN

You are now logged in to the MAAS server at
http://192.168.12.19:80/MAAS/api/2.0/ with the profile name 'admin'.

For help with the available commands, try:

  maas admin --help

^^^ nothing mentions port 5240

$ grep -a -o http://192.168.12.19:5240/MAAS/api/2.0/version/ ~/.maascli.db
http://192.168.12.19:5240/MAAS/api/2.0/version/
http://192.168.12.19:5240/MAAS/api/2.0/version/

^^^ but it appears in maascli.db