Earlier  
Posted Nick Remark
#openstack-nova - 2023-04-17
09:27:52 bauzas https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume/fs.py#L113
09:27:55 bauzas found it
09:28:51 bauzas https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume/mount.py#L262 this is what's eventually called
09:29:20 bauzas which indeed calls a prevsep helper https://github.com/openstack/nova/blob/master/nova/virt/libvirt/volume/mount.py#L308
09:29:53 bauzas and yeah look https://github.com/openstack/nova/blob/master/nova/privsep/fs.py#L30
09:33:01 bauzas oh wait
09:33:25 Uggla bauzas, yes and as gibi said there is no link with the context. That's the reason why I don't understand the issue.
09:33:37 bauzas Uggla: as a reminder, the privsep helper doesn't run as root
09:34:49 bauzas it runs as the nova user with sudo rights, which is different
09:36:43 bauzas iirc, rootwrap only runs privsep with https://github.com/openstack/nova/blob/master/etc/nova/rootwrap.d/compute.filters
09:37:14 bauzas and then the privsep client connects to the privsep socket
09:37:58 bauzas that's why I'm suspecting you miss some privsep capability
09:39:37 Uggla bauzas, hum you lost me. As privsep is a replacement for rootwrap in my mind.
09:41:31 bauzas Uggla: privsep is a deamon https://github.com/openstack/oslo.privsep/blob/master/oslo_privsep/daemon.py
09:41:54 bauzas and iirc, we start it thru rootwrap https://github.com/openstack/oslo.privsep/blob/master/oslo_privsep/daemon.py#L32
09:42:23 bauzas then, the privsep client connects to the deamon which has escalated rights
09:42:24 gibi bauzas: if the same sequence works with and admin user token but not with the demo user token then I don't think this is a privsep capability issue but I have no better idea :/
09:42:45 bauzas gibi: I haven't understand the same
09:43:10 bauzas I thought Uggla was saying that the mount wasn't working with a nova user, but a mount command was working fine with sudo righrs
09:43:35 bauzas hence me thinking this was about a missing cap
09:44:12 bauzas but agreed, if an admin API call can mount thru nova, then yeah, this is a keystone context problem and not a privsep one
09:46:37 Uggla bauzas, the sudo mount command was just to prove that it is not an issue with missing directory and that mount.nfs is possible on the host. And it works fine as an os admin and not as a os user.
09:46:50 bauzas ohok
09:46:54 bauzas my bad then
09:47:03 bauzas soooo, pdb it
09:48:24 stephenfin sqlalchemy-migrate is finally gone. Whoop! 🥳
09:48:24 stephenfin sqlalchemy-migrate is finally gone. Whoop! 🥳
09:48:31 bauzas Uggla: have you checked that all the attributes for the privsep.mount call are the same, between a standard user and an admin user?
09:48:32 stephenfin Now to get the other projects to do the same
09:48:40 stephenfin Thanks for the reviews :)
09:48:43 bauzas stephenfin: kudos for the win.
09:49:11 stephenfin I hope nova jobs will start passing here shortly https://review.opendev.org/c/openstack/requirements/+/879743
09:49:12 Uggla bauzas, unless if I'm wrong we are calling the same.
09:50:09 Uggla bauzas, if you wish I can show you a demo in the beginning of the afternoon.
09:50:28 bauzas Uggla: I've seen a couple of log debug messages, should be quick to verify
09:50:31 bauzas Uggla: sure
10:26:32 songwenping bauzas, sean-k-mooney: hi guys, i have attach nvidia gpu(v100/A100) to the vm with 'virsh attach-device --persistent --live' , i can find the gpu in the vm with lspci, but nvidia-smi cnanot find the gpu, with the error 'NVRM: GPU 0000:05:00.0: RmInitAdapter failed! ', do you have any advices?
11:29:52 opendevreview Rajesh Tailor proposed openstack/nova master: Fix case-sensitivity for metadata keys https://review.opendev.org/c/openstack/nova/+/873901
12:07:51 bauzas songwenping: this is unfortunately not a nova issue, IMHO
12:08:18 bauzas if you can list the vgpu by lcpci, it looks to me a nvidia driver issue
12:14:12 songwenping bauzas: right, but where can we find some doc to prove it's nvidia driver issue?
12:24:08 opendevreview Stephen Finucane proposed openstack/placement master: db: Replace use of deprecated API https://review.opendev.org/c/openstack/placement/+/880623
12:24:09 opendevreview Stephen Finucane proposed openstack/placement master: tests: Use base class for all functional tests https://review.opendev.org/c/openstack/placement/+/880624
12:24:09 opendevreview Stephen Finucane proposed openstack/placement master: tests: Warn on *any* SAWarning warning https://review.opendev.org/c/openstack/placement/+/880625
12:31:57 Uggla gibi, bauzas I have progressed a little. In fact I was fooled. The mount issue is not linked to user vs admin. But the first to the api is failing, but the second one is working, and this is not linked to timing.
12:32:22 Uggla s/first/first call/
12:46:58 bauzas Uggla: let's discuss this directly by gmeet if you want ;)
12:47:08 Uggla ok
12:47:17 Uggla cleaning my env and calling you
12:48:13 bauzas songwenping: honestly, nova just adds a mdev on the libvirt XML https://libvirt.org/drvnodedev.html#mediated-devices-mdevs
12:48:32 bauzas Uggla: ok
13:22:03 artom Uggla, oh, the privsep mount thing
13:22:09 artom Yeah, it's super weird, I am indeed a witness
13:41:30 opendevreview Dan Smith proposed openstack/nova master: Remove silent failure to find a node on rebuild https://review.opendev.org/c/openstack/nova/+/880632
13:41:30 opendevreview Dan Smith proposed openstack/nova master: Stop ignoring missing compute nodes in claims https://review.opendev.org/c/openstack/nova/+/880633
13:41:41 dansmith bauzas: I pulled the RT stuff out into a separate set^
13:42:02 bauzas dansmith: on a long call with Uggla but okay, I'll try
13:42:07 dansmith and fixed another silent failure we ignore in evacuate
14:21:10 bauzas gibi: dansmith: sean-k-mooney: fyi, we discussed with Uggla about his series and we discovered a potential large leak for ACLs in Manila access rights
14:21:32 gibi ack
14:21:39 bauzas gibi: dansmith: sean-k-mooney: when adding an access-allow for the share, we pass the compute IP address to Manila
14:21:55 dansmith which is visible by the user?
14:21:57 bauzas then the IP address can be seen by any user in the same project, and also any user can delete this ACL
14:22:19 dansmith that'd be bad
14:22:42 bauzas so we need to tell the Manila folks to somehow hide those details
14:22:57 dansmith yeah
14:23:22 bauzas if the ACL is done by a service, it shouldn't be seen by an enduser, neither be able to delete it
14:23:46 bauzas if we ask Manila to lock a share, that's a different concern
14:23:55 sean-k-mooney bauzas: this is partly why i wanted to use the cert auth method not the ip one
14:23:57 bauzas because users can delete ACLs without unlocking
14:24:09 dansmith ...yup
14:24:38 bauzas sean-k-mooney: it should also leak the certificate, right?
14:24:49 bauzas and users could also delete the ACL
14:25:23 bauzas there are two problems to resolve : 1/ we need to hide the ACL, 2/ we need to make sure it's not possible to delete it by an user
14:25:30 Uggla sean-k-mooney, also today you can do a manila show share that will reveal IP + export location
14:25:32 sean-k-mooney the cert would be a per vm cert generted for that insntace
14:25:33 bauzas we == Manila API
14:25:40 sean-k-mooney and it woudl only be the public key
14:25:50 sean-k-mooney so i dont think we care if that is visable
14:26:31 dansmith does nova use only the user's token to talk to mania?
14:26:32 bauzas sean-k-mooney: then we would need to extend the lock mechanism to deny any ACL modification
14:26:35 dansmith *manila
14:26:53 sean-k-mooney https://docs.openstack.org/api-ref/shared-file-system/?expanded=grant-access-detail#grant-access
14:26:58 bauzas dansmith: we tested this also with admin
14:27:02 dansmith I'm asking
14:27:08 sean-k-mooney i would prefer to use cert or user for auth then ip
14:27:20 bauzas dansmith: if you're an admin, you can generate a share and add an ACL
14:27:36 bauzas dansmith: but any user from the same project can both see the share and delete the ACL you created
14:27:40 dansmith bauzas: can you answer my question?
14:28:01 dansmith does nova use the user's token (only) to talk to manila?
14:28:13 sean-k-mooney dansmith: yes i belive we use only the user token in the current proposal
14:28:18 bauzas dansmith: IIRC today yes but Uggla knows better about it
14:28:24 dansmith ack
14:28:30 sean-k-mooney but we could add an admin token if we needed too. i dont think we use any admin api today
14:28:38 dansmith we have a lot of different places where we've done that in the past and it has come back to bite us
14:28:39 sean-k-mooney but we might for the lock api
14:28:42 bauzas we discussed this at the PTG, we could use a service token if Manila adds it
14:28:51 bauzas but again, we missed at the PTG the ACL problem
14:28:59 dansmith cinder, glance, etc.. so perhaps we should not replicate the same thing here
14:29:21 sean-k-mooney bauzas: the probelm is leakign the ip/subnet of the nova comptue host

Earlier   Later