Sunday, 2025-01-26

opendevreviewMerged openstack/openstack-ansible stable/2024.1: Remove ansible-role-qdrouterd from zuul required-projects  https://review.opendev.org/c/openstack/openstack-ansible/+/93991403:24
hamidlotfi_Hi there, I apologize; this may not be the right place to ask this question.04:49
hamidlotfi_Is enabling or disabling SNAT for each port individually in the router definition possible (OVS)? Please advise.04:49
noonedeadpunkhamidlotfi_: no, I think you can do that only to the router as a whole10:50
birbilakosHi everyone. I'd like to hook up an existing ceph storage cluster in my openstack. Cluster is already in the storage network. I'm thinking to opt of the second approach as explained here: https://docs.openstack.org/openstack-ansible/latest/user/ceph/full-deploy.html which is basically defining the ceph mons in user_variables11:29
birbilakosIf i understand it right, I also need this in my user_variables: https://docs.openstack.org/openstack-ansible-ceph_client/latest/config-from-file.html11:30
noonedeadpunkbirbilakos: so I think second approach is not defining ceph_mons but instead provide ceph.conf and keyrings into /etc/openstack_deploy folder11:31
noonedeadpunkand I'd indeed suggest using this method11:31
birbilakoshmm11:31
birbilakosso it's either-or, right?11:31
noonedeadpunkAs the one with defining ceph_mons would require osa deploy host to SSH to these hosts to fetch data from the directly11:31
birbilakosI though I need both11:31
noonedeadpunkno, it's either or11:32
noonedeadpunkif you have ceph.conf provided - you don't need ceph_mons11:32
birbilakosgot it11:32
noonedeadpunkand also - defining ceph_mons will trigger logic to go to these mons and fetch ceph.conf from them11:32
birbilakosso I need to fix user_variables.yml based on the second page11:33
birbilakoswhat would be the playbooks to run? I need integration with cinder, glance for sure11:33
noonedeadpunkceph_client is triggered from inside of service roles11:34
noonedeadpunkso it will be part of os_glance, os_cinder, os_nova11:34
birbilakosand btw, I would like to keep my already defined cinder & glance storage config11:34
birbilakoshere's the current config: https://paste.opendev.org/show/byFYutEIfEeLW479MQkf/11:35
noonedeadpunkso they all do support working with multiple backends. But depending on your use-case, you still might need to be cautious with configuration to get intended behaviour11:35
birbilakosi want to keep the nfs backends since it has stuff stored11:35
noonedeadpunkone things with cinder and Ceph/NFS, is that NFS driver does not support active/active mode, while Ceph does support11:36
birbilakosi just want to 'append' the ceph option on top (and make it default backend going forward)11:36
noonedeadpunkso what we did when were migrating from NFS to Ceph - defined a second group of cinder_volume for ceph specifically (inside lxc)11:36
birbilakoslet me clarify: the existing config uses NFS but its not backed by Ceph 11:37
birbilakosI'd like to move away from NFS for cinder & glance (eventually)11:37
birbilakosbut need both options for now in them11:38
noonedeadpunkyeah, sure, I got that. We had quite same issue11:38
noonedeadpunkand that is why I'm telling you about separate set of cinder_volume for Ceph11:38
noonedeadpunkGlance is not an issue at all11:38
noonedeadpunkIt is smart enough and stores path for all existing images11:38
noonedeadpunkSo once you change default store - old images will keep working11:39
noonedeadpunkand for cinder - it's better to separate cinder-volume working with ceph and with nfs, imo11:40
birbilakoshmm, how can this be done?11:40
noonedeadpunkI don't have exact config with me, as we've wiped nfs leftovers years ago, but we've defined extra groups which are part of cinder_volume and used group_vars to control which one will have what backend11:41
noonedeadpunkbut we were also running NFS one on bare metal rather then LXC11:42
birbilakosok11:42
birbilakosI think I'll just get rid of the current cinder backend and just keep the NFS backed glance11:42
birbilakosi reckon just removing the cinder config from openstack_user_config would be sufficient, right?11:43
noonedeadpunkum11:45
noonedeadpunkgiven you have no VMs running volumes on NFS - yes11:46
noonedeadpunkso we did defined new group through env.d for sure: https://docs.openstack.org/openstack-ansible/latest/reference/inventory/understanding-inventory.html#understanding-container-groups-env-d-structure11:48
noonedeadpunkbut I really can't find good enough example right now in our docs...11:49
noonedeadpunkprobably that: https://docs.openstack.org/openstack-ansible/latest/user/prod/provnet_groups.html#custom-groups11:51
jrosserif you use boot-from-volume there are advantages to having cinder and glance on the same ceph cluster12:05
jrosserit cann be set up so that there is no data copying / just a snapshot to get from your glance image to boot volume12:05
noonedeadpunkhm, I've tried to just roll-out capi_proxy, and I also have error like was reported by somebody a while back12:14
noonedeadpunkrequests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://internal.cloud.io:6443/apis/infrastructure.cluster.x-k8s.io/v1beta1/namespaces/magnum-system/openstackclusters12:14
noonedeadpunkwhile it obviously does exist12:15
noonedeadpunk`kubectl -n magnum-system get openstackclusters` returns non-empty reply12:15
noonedeadpunk kubectl -n magnum-system get openstackclusters uses slightly different url though....12:45
noonedeadpunkhttps://internal.cloud.io:6443/apis/infrastructure.cluster.x-k8s.io/v1alpha7/namespaces/magnum-system/openstackclusters vs https://internal.cloud.io:6443/apis/infrastructure.cluster.x-k8s.io/v1beta1/namespaces/magnum-system/openstackclusters12:45
noonedeadpunkso v1alpha7 vs v1beta112:47
noonedeadpunkok, so this: https://github.com/vexxhost/magnum-cluster-api/commit/8e375c414ab3e2027486b105b12765891850c8ac12:51
noonedeadpunkaha12:52
noonedeadpunkso mcapi_vexxhost_proxy_install_branch is not really aligned with magnum_magnum_cluster_api_git_install_branch12:52
noonedeadpunkok, makes sense now12:52
opendevreviewMerged openstack/openstack-ansible stable/2023.2: Remove ansible-role-qdrouterd from zuul required-projects  https://review.opendev.org/c/openstack/openstack-ansible/+/93991512:55
noonedeadpunkjrosser: do you know from top of your head - which interface magnum capi tries to reach the proxy from?13:32
jrosserthe proxy talks to mcapi through the internal vip to update capi idea of where the workload cluster api endpoint is, I think13:34
jrosserthen mcapi calls direct to the proxy ip it was given13:35
noonedeadpunkso I'm thinking about how to limit haproxy binding13:36
noonedeadpunkas * is - ugh. There's an env var PROXY_BIND which can be used13:36
noonedeadpunkand my guess would be - that it should be management_address, as capi don't have anything else to communicate with haproxy...13:37
noonedeadpunkbut I'm not 100% sure13:37
noonedeadpunkas the only network capi master cluster and compute share - is management network kinda...13:39
noonedeadpunkyeah, sure internal vip can be used for communication13:39
jrosserthis should be in the example?13:39
noonedeadpunkthere's no doc for  proxy part fwiw13:40
noonedeadpunkor you mean vexxhost docs?13:40
jrosserproxy_bind should yes be mgmt address on the network/compute node13:40
noonedeadpunk++13:40
noonedeadpunkthanks!13:40
jrosseroh dog maybe I didn’t finish that13:40
jrosseralso port13:40
noonedeadpunkI will write some docs then13:40
jrosserthere’s a var for that otherwise it s random13:40
noonedeadpunkor well... we figure it out )13:40
noonedeadpunkyeah, saw also port13:40
noonedeadpunkbut wasn't sure if it might need to be random13:41
jrosserthe probably the “k8s way” :)13:41
noonedeadpunkok, backend is identified by sni, so it can be very much static13:41
noonedeadpunkyeah, I hate env vars....13:41
hamidlotfi_noonedeadpunk: Thanks.13:41
noonedeadpunkI see no good reason why this can not be in conf as well...13:42
jrosseroh well, i added the env vars13:43
jrosserbefore it was just wired to 0.0.0.0:random13:43
jrosseras i am not sure there is a config file for this right now?13:44
noonedeadpunkso proxy does try to load config file, but it's not required13:44
noonedeadpunkand rest goes from ENV vars13:44
jrosserah ok so we could make this be better13:45
jrosserthough of course there is no magnum.conf on the computes/network nodes.......13:45
noonedeadpunkand the role has magnum_cluster_api_proxy_environment13:45
noonedeadpunkwhich passes them to systemd unit13:45
jrosseryes13:45
noonedeadpunkwell. role does create /etc/capi_proxy but it's an empty folder13:47
noonedeadpunkhamidlotfi_: btw, was it you who struggled with CAPI driver for Magnum?13:51
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Respect defined version and source of mcapi driver  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94021714:05
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Fix a typo in mcapi_vexxhost_proxy_git_constraints  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94021814:06
noonedeadpunkthough I have a different more weird issue now with haproxy not marking backend as up :(14:11
noonedeadpunkanyway...14:11
jrosseris this ovn?14:13
jrosserlinuxbridge/ovs it goes on the network nodes14:13
jrosserovn it needs to be on *all* the computes14:13
noonedeadpunkyeah, it's on all computes14:15
noonedeadpunkbut I've just spotted that it goes to loadbalancer rather then spawned controller14:16
noonedeadpunkand I was checking connection to controller. Though LB is indeed unreachable from ovnmeta namespace for some reason14:16
noonedeadpunkso likely it's smth off with env inself14:17
jrosserI think it will always go to the lb rather than the controller14:24
jrosseras the controller ip will be unknown, and change during upgrade or self-healing14:25
birbilakosnoonedeadpunk: I went ahead and deployed the cinder changes - now I see the following in the cinder volumes container: Jan 26 14:34:56 infra1-cinder-volumes-container-d4c1df53 cinder-volume[64]: 2025-01-26 14:34:56.075 64 ERROR cinder.service [-] Manager for service cinder-volume infra1-cinder-volumes-container-d4c1df53@rbd is reporting problems, not sending heartbeat. Service will appear "down".14:35
birbilakossudo ceph -n client.cinder status works in the container so this doesn't seem like a connection issue14:36
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Move variables defenition from playbook level for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022014:41
noonedeadpunkjrosser: yeah, that's fair. though I somehow don't have access from the namespace to the loadbalancer. While loadbalancer seems doing fine and I don't see issues reaching k8s controller from amphora... so it's somehow weird... I kinda wonder in metadata namespace even gonna have access if vm spawned with disk-config14:45
birbilakosFull log: https://paste.opendev.org/show/bBmv7etvZrttKQiVe5vd/14:45
noonedeadpunkas then metadata isn't really used14:45
noonedeadpunkbirbilakos: and does `rbd -n client.cinder ls -p volumes` work?14:46
noonedeadpunkas it looks you didn't give enough permissions14:46
birbilakosroot@infra1-cinder-volumes-container-d4c1df53:~# rbd -n client.cinder ls -p volumroot@infra1-cinder-volumes-container-d4c1df53:~# rbd -n client.cinder ls -p volumes rbd: error opening pool 'volumes': (2) No such file or directory rbd: listing images failed: (2) No such file or directoryes rbd: error opening pool 'volumes': (2) No such file or directory rbd: listing images failed: (2) No such file or directory14:46
noonedeadpunkok, I in fact don't know what was the pool name you've configured in ceph14:47
noonedeadpunkand in cinder14:47
birbilakosdefault config14:47
noonedeadpunkbut I'm pretty sure it's a premission issue for the client to the pool14:47
birbilakosdo I need to create the pool on the ceph side?14:47
noonedeadpunkthere's no such thing as "default cofig"14:48
noonedeadpunkyes, sure14:48
noonedeadpunkand ensure client.cinder has enough permissions to it14:48
birbilakoswell, I gave admin perms to client.cinder14:48
noonedeadpunkum14:48
noonedeadpunkit doesn't need them for sure14:48
birbilakosclient.cinder         key: <key>         caps: [mds] allow *         caps: [mgr] allow *         caps: [mon] allow *         caps: [osd] allow *14:49
birbilakosrbd_pool: volumes14:50
noonedeadpunkso we set permissions like that to ceph we setup with ceph-ansible: https://opendev.org/openstack/openstack-ansible/src/branch/master/inventory/group_vars/all/ceph.yml#L53-L6014:50
noonedeadpunkandpools like that: https://opendev.org/openstack/openstack-ansible/src/branch/master/inventory/group_vars/ceph_all.yml#L51-L7114:50
noonedeadpunkbut neverthe less - with external ceph you need to ensure existance of clients and pools and pretty much everything14:51
noonedeadpunk(caps)14:51
noonedeadpunkas cinder/glance just consume what are given14:51
birbilakosjust added the pool volumes and enabled application rbd to it14:53
birbilakosrestarted cinder volumes and still getting same errors. Seems perms related14:53
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Move variables defenition from playbook level for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022014:54
birbilakosrados.PermissionDeniedError: [errno 13] RADOS permission denied (error connecting to the cluster)14:54
noonedeadpunkseems like this, yes14:54
opendevreviewMerged openstack/openstack-ansible stable/2023.1: Remove ansible-role-qdrouterd from zuul required-projects  https://review.opendev.org/c/openstack/openstack-ansible/+/93994114:54
birbilakoshere's the relevant config I see in the cinder volumes container: https://paste.opendev.org/show/bwGt5aUtAYEXDbu72NkL/14:57
noonedeadpunkI kind of wonder how you was setting permissions14:58
birbilakossudo ceph auth get-or-create client.cinder     mon 'allow *'     mgr 'allow *'     osd 'allow *'     mds 'allow *'     -o client.cinder14:59
birbilakosthis should create the client for cinder and the keyring15:00
birbilakosis it possible that rados is trying to access with a different client?15:05
birbilakosis the rbd_secret_uuid something I should fill in in the config?15:07
noonedeadpunkyeah, that should be enough...15:08
noonedeadpunkrbd_secret_uuid - um, I think it's mainly for qemu15:08
noonedeadpunkalso - you still should be able to do some listing/oprations to the pool with the client15:09
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Move variables defenition from playbook level for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022015:13
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Move variables defenition from playbook level for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022015:15
birbilakosthis works: rados --id cinder --keyring cinder.keyring -p volumes ls15:18
birbilakosand this also works form within the container: rados --id cinder --keyring /etc/ceph/ceph.client.cinder.keyring -p volumes ls15:21
noonedeadpunkI kind of wonder about keyring naming though15:46
noonedeadpunkyeah, looks like it's correct one15:47
noonedeadpunkok, but that is both rados15:48
noonedeadpunkwhat about rbd?15:48
noonedeadpunkas rados is not _that_ relevant for cinder, it mostly operates as rbd15:48
noonedeadpunk(though it would be still needed)15:49
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: Move variables defenition from playbook level for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022015:49
birbilakosis it a probelm that ceph version is quincy in my cluster and reef in the container?15:50
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: [doc] Add brief documentation for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022215:50
opendevreviewDmitriy Rabotyagov proposed openstack/openstack-ansible-ops master: [doc] Add brief documentation for mcapi proxy  https://review.opendev.org/c/openstack/openstack-ansible-ops/+/94022215:53
noonedeadpunkI don't think it's actually a problem, as clients do have backwards compatability15:53
birbilakosroot@infra1-cinder-volumes-container-d4c1df53:~# rbd --keyring /etc/ceph/ceph.client.cinder.keyring ls volumes 2025-01-26T15:53:36.528+0000 7fe0917f7640 -1 monclient(hunting): handle_auth_bad_method server allowed_methods [2] but i only support [2,1] rbd: couldn't connect to the cluster! rbd: listing images failed: (13) Permission denied15:54
birbilakosany ideas what is that?15:54
noonedeadpunknot really, no15:54
noonedeadpunkonly guess could be monitor api version 1 vs 215:54
birbilakosrbd -n client.cinder ls volumes works from within the container16:17
birbilakosstill getting rados.PermissionDeniedError: [errno 13] RADOS permission denied (error connecting to the cluster) from cinder volumes though :(16:19
birbilakosnoonedeadpunk: well, I ended up using client admin with the appropriate keyring. It worked :)16:42
birbilakosanother question: i noticed that new instances store their disk in the vm pool now, even though I don't create a volume for them. Why is that? Can I avoid it and keep the disk local to the compute unless block storage mapping is requested?17:30
birbilakoswould simply removing this line be enough? nova_libvirt_images_rbd_pool: vms17:37
birbilakosit worked, though it would be a nice feature to have on some occassions. Wonder if it could be configured when creating an instance...19:10

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