Monday, 2021-11-22

*** JqckB_ is now known as JqckB09:31
*** TheJulia_ is now known as TheJulia09:32
opendevreviewDiwei Zhu proposed openstack/python-openstackclient master: Switch command server add volume to sdk.  https://review.opendev.org/c/openstack/python-openstackclient/+/81591915:54
opendevreviewDiwei Zhu proposed openstack/python-openstackclient master: Switch command server add volume to sdk.  https://review.opendev.org/c/openstack/python-openstackclient/+/81591916:01
opendevreviewDaniel Speichert proposed openstack/openstacksdk master: fix: improperly encoded object names  https://review.opendev.org/c/openstack/openstacksdk/+/81879516:07
opendevreviewDiwei Zhu proposed openstack/python-openstackclient master: Switch command server remove volume to sdk  https://review.opendev.org/c/openstack/python-openstackclient/+/81798916:09
*** sshnaidm is now known as sshnaidm|afk16:45
*** sshnaidm|afk is now known as sshnaidm17: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
gtemaI guess workaround is to use the plain SDK/create_server call, it doesn't do such validation18:17
gtemaI mean conn.compute.create_server18: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
gtemaHa, do you mean nova itself does this?18:57
gtemaWell, 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 key19:00
ivan__Is there a way to connect as the user without knowing their password?19:01
gtemaDepending on particular cloud, but natively no19:05
*** sshnaidm is now known as sshnaidm|afk19:26
fricklerthe 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 that19: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
fricklerivan__: yes, you would have to fetch the users pubkey and create a keypair with that as your admin user19:56

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!