| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2022-09-20 | |||
| 13:05:32 | sean-k-mooney | well free -m will work if and only if you have done swap on | |
| 13:05:57 | auniyal | yes, in tempest | |
| 13:06:53 | sean-k-mooney | so would proably check if there is a disk with a swap partaion and or check its size if that is impoatnt to the test | |
| 13:07:29 | auniyal | lsblk, gives size, but no column for swap | |
| 13:07:34 | sean-k-mooney | auniyal: by the way you need to check if there is a an addtional disk (not the root disk) with a swap partion | |
| 13:08:03 | sean-k-mooney | you would need to look at the filesystem/paretitio type | |
| 13:08:13 | sean-k-mooney | with somethign like fdisk | |
| 13:08:22 | sean-k-mooney | but i think lsblk can include that info | |
| 13:09:11 | auniyal | $ | |
| 13:09:11 | auniyal | FilenameTypeSizeUsedPriority | |
| 13:09:11 | auniyal | $ cat /proc/swaps | |
| 13:09:31 | auniyal | $ lsblk | |
| 13:09:32 | auniyal | vdb 252:16 0 1G 0 disk | |
| 13:09:32 | auniyal | `-vda15 252:15 0 8M 0 part | |
| 13:09:32 | auniyal | |-vda1 252:1 0 40G 0 part / | |
| 13:09:32 | auniyal | vda 252:0 0 40G 0 disk | |
| 13:09:32 | auniyal | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
| 13:09:48 | sean-k-mooney | that will only show swap if you did swapon | |
| 13:09:53 | sean-k-mooney | to activate the swap | |
| 13:09:59 | sean-k-mooney | lsblk -f | |
| 13:10:04 | sean-k-mooney | will list the filesystem | |
| 13:12:02 | auniyal | lsblk -f: it's showing, use and available, but nothing swap | |
| 13:16:57 | auniyal | blkid, t | |
| 13:17:33 | auniyal | blkid, this returns disk, and their type, if we have swap in flavor it show else not, | |
| 13:17:45 | auniyal | @sean-k-mooney, we can use right ? | |
| 13:18:14 | opendevreview | Merged openstack/osc-placement master: Switch to 2023.1 Python3 unit tests and generic template name https://review.opendev.org/c/openstack/osc-placement/+/856787 | |
| 13:18:23 | auniyal | server with swap | |
| 13:18:25 | auniyal | $ blkid | grep swap | |
| 13:18:37 | auniyal | $ | |
| 13:18:37 | auniyal | $ blkid | grep swap | |
| 13:19:10 | auniyal | $ | |
| 13:19:10 | auniyal | $ blkid | grep swap | |
| 13:19:31 | auniyal | not sure,why its not coming here | |
| 13:19:58 | auniyal | $ """ | |
| 13:19:58 | auniyal | """$ blkid | grep swap | |
| 13:21:21 | bauzas | auniyal: you need sudo rights | |
| 13:21:43 | bauzas | but agreed with sean, best is to check the partitions | |
| 13:21:58 | bauzas | some guest could swapoff | |
| 13:22:06 | bauzas | I mean, some image | |
| 13:24:51 | auniyal | oh, thanks bauzas, I was not using sudo with lsblk | |
| 13:27:41 | bauzas | auniyal: you can also fdisk -l the partitions but you'll only get the devname | |
| 13:27:59 | auniyal | can we use blkid, there also it shows dev name- http://pastebin.test.redhat.com/1074402 | |
| 13:28:00 | bauzas | that's why blkid is better as you see this is swap | |
| 13:28:31 | bauzas | yeah, as said, blkid is better for exactly knowing the partition type | |
| 13:28:46 | auniyal | ack | |
| 13:28:48 | bauzas | fdisk -l just shows you the device names | |
| 13:30:43 | sean-k-mooney | blkid is ok | |
| 13:30:48 | sean-k-mooney | we use it in tempest already | |
| 13:31:04 | sean-k-mooney | blkid in cirros might however have less info | |
| 13:31:25 | sean-k-mooney | so check it there too | |
| 13:35:18 | bauzas | sean-k-mooney: do you know if cirros supports POSIX ? | |
| 13:35:25 | auniyal | cirros has blkid, it showing swap | |
| 13:35:28 | sean-k-mooney | bauzas: it uses busybox | |
| 13:35:35 | sean-k-mooney | for many of the unitls | |
| 13:35:42 | sean-k-mooney | blkid i dont think is part of posix | |
| 13:35:42 | bauzas | I know | |
| 13:35:58 | sean-k-mooney | but even if it is the options we need might not be | |
| 13:36:16 | sean-k-mooney | i know for example the cirros imple of lspic is much more limited | |
| 13:36:38 | sean-k-mooney | auniyal: ok if blkid is showing swap | |
| 13:36:53 | sean-k-mooney | then all you have to do is assert the swap disk exsit seperatly from the root disk | |
| 13:36:58 | sean-k-mooney | or not | |
| 13:37:04 | sean-k-mooney | depending on the flavor | |
| 13:37:13 | sean-k-mooney | some cloud image have swap baked into them | |
| 13:37:32 | bauzas | https://man7.org/linux/man-pages/man8/blkid.8.html#AVAILABILITY | |
| 13:37:32 | sean-k-mooney | so checking that the swap partion is not on the root image might be imporant | |
| 13:37:51 | bauzas | so blkid is indeed in busybox | |
| 13:40:18 | sean-k-mooney | https://github.com/brgl/busybox/blob/master/util-linux/blkid.c | |
| 13:40:39 | sean-k-mooney | https://github.com/brgl/busybox/blob/abbf17abccbf832365d9acf1c280369ba7d5f8b2/util-linux/volume_id/get_devname.c#L231-L249 | |
| 13:41:06 | sean-k-mooney | so it will print the type if the type is compiled in | |
| 13:41:26 | sean-k-mooney | but it does nto actully use the args you pass | |
| 13:41:34 | sean-k-mooney | unlikel the real blkid | |
| 13:41:53 | bauzas | anyway, it should print the types exactly like linux | |
| 13:42:09 | bauzas | so a grep on swap is doable | |
| 13:42:12 | sean-k-mooney | yes but you cant contol the output or pass any flags | |
| 13:42:20 | bauzas | yes | |
| 13:42:30 | bauzas | but, pipe ftw ! | |
| 13:42:45 | sean-k-mooney | well you can passs them it wont do anything so we shoudl keep it genic | |
| 13:42:47 | sean-k-mooney | yep | |
| 13:43:06 | bauzas | sean-k-mooney: agreed, just using the standard libs | |
| 13:43:14 | bauzas | and the "posix" format | |
| 13:43:18 | bauzas | (note the quotes) | |
| 13:43:35 | bauzas | basically "blkid | grep swap" is portable | |
| 13:43:56 | sean-k-mooney | ya | |
| 13:44:13 | sean-k-mooney | although that may not work probely if the root disk has a swap partion | |
| 13:44:19 | sean-k-mooney | i guess we dont care | |
| 13:44:26 | sean-k-mooney | cirros does not i belive | |
| 13:44:39 | sean-k-mooney | and ubunut/rhel i belive also do not have swap partions | |
| 13:45:00 | sean-k-mooney | but if you use tempest with a vm image that does it would fail in that case | |
| 13:45:57 | sean-k-mooney | anyway if we want to do more then "blkid | grep swap" | |
| 13:46:19 | sean-k-mooney | i would instead just do "blkid" and do the rest in python | |
| 13:46:22 | sean-k-mooney | in tempest | |
| 13:48:18 | jkulik | melwitt: how come Nova depends on the unified-limits API while it's still marked as experimental in keystone docs? https://docs.openstack.org/keystone/latest/admin/unified-limits.html does that mean, we would need to upgrade Keystone and Nova in lockstep after yoga? | |
| 13:50:27 | opendevreview | Stephen Finucane proposed openstack/nova stable/zed: Remove mentions of removed scheduler filters https://review.opendev.org/c/openstack/nova/+/858534 | |
| 13:50:55 | opendevreview | Stephen Finucane proposed openstack/nova stable/yoga: Remove mentions of removed scheduler filters https://review.opendev.org/c/openstack/nova/+/858025 | |
| 13:51:27 | opendevreview | Stephen Finucane proposed openstack/nova stable/xena: Remove mentions of removed scheduler filters https://review.opendev.org/c/openstack/nova/+/858024 | |
| 13:52:01 | bauzas | stephenfin: hah | |
| 13:52:02 | opendevreview | Stephen Finucane proposed openstack/nova stable/wallaby: Remove mentions of removed scheduler filters https://review.opendev.org/c/openstack/nova/+/858050 | |
| 13:52:15 | bauzas | stephenfin: hold you brace and wait for Zed GA, my dear | |
| 13:52:19 | bauzas | your* | |
| 13:52:52 | stephenfin | eh, those shouldn't go into merge conflict. They can sit for a week or two. They're only docs | |