*** JqckB_ is now known as JqckB | 09:31 | |
*** TheJulia_ is now known as TheJulia | 09:32 | |
opendevreview | Diwei Zhu proposed openstack/python-openstackclient master: Switch command server add volume to sdk. https://review.opendev.org/c/openstack/python-openstackclient/+/815919 | 15:54 |
---|---|---|
opendevreview | Diwei Zhu proposed openstack/python-openstackclient master: Switch command server add volume to sdk. https://review.opendev.org/c/openstack/python-openstackclient/+/815919 | 16:01 |
opendevreview | Daniel Speichert proposed openstack/openstacksdk master: fix: improperly encoded object names https://review.opendev.org/c/openstack/openstacksdk/+/818795 | 16:07 |
opendevreview | Diwei Zhu proposed openstack/python-openstackclient master: Switch command server remove volume to sdk https://review.opendev.org/c/openstack/python-openstackclient/+/817989 | 16:09 |
*** sshnaidm is now known as sshnaidm|afk | 16:45 | |
*** sshnaidm|afk is now known as sshnaidm | 17:16 | |
ivan__ | Hello everyone. I am trying to use an admin account to create a server instance for a given user by supplying user_id. This seems to work unless I also supply the user's ssh key (through argument key_name). The SDK is trying to look that key_name up under the admin’s account rather than under user’s account. Can I tell the create_server functions to use the user’s key? Or, is there a workaround that I can use?. | 18:14 |
gtema | I guess workaround is to use the plain SDK/create_server call, it doesn't do such validation | 18:17 |
gtema | I mean conn.compute.create_server | 18:20 |
ivan__ | gtema: I just tried that, but the same happened... To elaborate a bit, I am using connect_as_project() to try to 'impersonate' the user, but the key_name lookup still happens under admin user (I know this since, if I use a key_name that exists under admin, the server creation succeeds). | 18:49 |
gtema | Ha, do you mean nova itself does this? | 18:57 |
gtema | Well, in this case you have no other choice as to physically reconnect as user, alternate you import same key under admin user - it's anyway just a pub key | 19:00 |
ivan__ | Is there a way to connect as the user without knowing their password? | 19:01 |
gtema | Depending on particular cloud, but natively no | 19:05 |
*** sshnaidm is now known as sshnaidm|afk | 19:26 | |
frickler | the connect_as_project() only overrides project_id, but keypairs are user-based ressources in nova. with "openstack keypair list --user demo --debug" you can see the public key though, not sure if the sdk exposes that | 19:35 |
ivan__ | frickler: SDK exposes the keypair commands for a given user_id, but it does not seem to allow specifying user_id when creating a server for the purposes of looking up the key_name. | 19:55 |
frickler | ivan__: yes, you would have to fetch the users pubkey and create a keypair with that as your admin user | 19:56 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!