Tuesday, 2021-11-02

EugenMayerHello. Is there any way to trigger a snapshot using the cli? since i cannot find glance in the openstack cli, is there a dedicated cli?19:19
EugenMayeri see there is https://docs.openstack.org/ocata/cli-reference/glance.html but snapshots are not mentioned. 19:21
EugenMayeri guess it has been part of openstack in the past https://docs.openstack.org/python-openstackclient/ocata/command-objects/snapshot.html but seems no longer to be the case?19:23
EugenMayeri see there is volume snapshot create, but it seems to be dedicated to volumes. Cannot see how to trigger an snapshot of an instance this way19:24
EugenMayerok found it, it is `server backup create` - not sure how that happened to end there :)19:27
dansmithno, backup is different. You're looking for "server image create"19:27
EugenMayerdansmith what is the difference? There is also server restore, but that seems not even to work when i shutdown the server19:33
EugenMayerCannot 'restore' instance 20dbba41-3ddf-48f1-b934-9c47f75c5b0d while it is in vm_state stopped (HTTP)19:33
EugenMayerseems like server image create - creates someting of type image under /project/images, while backup uses type snapshot19:34
dansmithimage create is a snapshot,19:36
dansmithbackup tries to keep records to make periodic snapshots possible19:36
dansmithserver snapshots go to glance by definition19:36
EugenMayerthere is yet no API to lookup all backups for an instance, right? i see there is some meta-data instance_uuid on the snapshot19:38
dansmiththey're not special enough to be listed - they're just images19:39
EugenMayerdansmith wait, 'image create' is actually what creates the type 'snapshot', while `backup create` is of type image?19:39
dansmiththe backup API has historically been pretty under-used and unloved, so I really wouldn't use it19:39
dansmithEugenMayer: no, there are only images19:40
EugenMayerdansmith well the odd thing is, there is no backup concept in openstack entirely, is it?19:40
dansmiththere are images, that's it. Nova provides a backup API which tries to make it easier to schedule periodic snapshots, but that's it19:41
dansmithyou can call a snapshot a backup or not, up to you19:41
EugenMayerthere is freezer - seems entire dead? (not sure), at least it seems in a broken state right now. Creating snapshots seems somewhat one way, if one does not consider cinder storage snapshots to be "the backup"19:41
EugenMayerso backups are rather to be triggered using the nova api?19:41
dansmithdepends on what you're snapshotting. If you want a snapshot of the instance's disk, then yes of course through nova19:42
dansmithif you have a purely volume-backed instance, and you really want a snapshot of the volume in cinder, then ... cinder19:42
EugenMayeri have no volumes at all, only instance disks19:43
EugenMayer(so using local disks only)19:43
dansmiththen snapshotting cinder volumes is unlikely to be much use to you19:43
dansmiththere's nothing else _to_ do the snapshot against, other than nova, so I'm not sure where the confusion is19:43
EugenMayersure, that is what i have expected. What i wonder is, why backups are "unloved" and there is not much talk about that? Do i miss something obvious?19:44
dansmiththe backup api is *just* a wrapper around image_create with some attempt at periodic scheduling19:44
dansmithit's unloved because it's under-used, and was written before there were as many ways to back an instance, so it has historically been broken for certain configs19:45
EugenMayerunderstood19:45
EugenMayeryet no seen anything periodic, no scheduling at all. Might have missed that part? where are those periodic settings. Found nova backup, which has a rotation parameter19:46
EugenMayer <name>, <backup-type>, <rotation>19:46
dansmiththere is no scheduling19:46
dansmithnotice how I keep using words like "attempt at" and "you probably don't want this" ?19:47
dansmithhere's a random thing I found from 2016 which explains how it's supposed to work, including explaining that there is no scheduling: https://raymii.org/s/tutorials/OpenStack_Quick_and_automatic_instance_snapshot_backups.html19:47
EugenMayerSorry, not trying to ignore you/being ignorant, truying to really listen and wrap my head arround it19:47
dansmithbased on your questions from the nova channel, I'm guessing you're approaching this from the conventional virt perspective, and openstack really isn't that.. it's cloud19:47
dansmithso things you might think would be first-class features aren't19:48
dansmithin cloud, you get charged per byte per image, and instances are intended to be ephemeral (i.e. nothing to backup anyway) so periodic backups would just be periodic bills19:48
dansmithprecious data is stored in volumes (i.e. cinder) and those are snapshotted (and smartly) when you need things like rollback points19:49
EugenMayerwell we have somewhat of a hybrid setup. We have VMs which will stay as such since they cannot be containrized or should not ( very few ). All the other applications are going to be run in k8s, and we will see about storage solutions there (we are yet not sure). Currently we try to avoid to run X-db cluster (pg/mariadb ..10/11 5/8). So i try to19:50
EugenMayerfind a good combination for us in general. 19:50
dansmithyeah, so your DB should be on a cinder volume probably19:51
EugenMayerAnd backups of VMs, be it a kubernates node or a "VM classic" is essential for us. I understand that in OpenStack you backup volumes and treat instances(disk/ephimeral) as "can be thrown away"19:51
dansmithusing server snapshots to backup precious data will be quite inefficient in most cases19:51
EugenMayera db on a cinder volume would slow it down big times?19:52
dansmithdepends on your backend, but yeah it's likely to be slower than raw file on local disk of course19:52
EugenMayerinteresting, why you consider snapshots inefficient - du to there size and maybe issues with being incremental ( so ineffecient in "the time to create" and the "the storage they take up" ) ?19:52
dansmithare you using ceph?19:53
EugenMayerno, i considered it. But i was told 25GB on the network would be something you need to have a proper speed19:53
EugenMayerand i have 1GB19:53
dansmithif not, a snapshot will involve pausing the instance for the entire time it takes to make a *full* copy of the root disk, and then it will upload the entire thing to glance over HTTP19:53
dansmiththat will be super bad for a DB you expect to be highly available, and will cost a lot of network, cpu and storage resources to do periodically19:54
dansmithif you're using anything other than raw image backend files on nova, also add the time it takes to fully flatten the original image with the cow bits before that upload19:55
EugenMayeri understand, we do this daily. So once a day there is a short interruption. But considering that the cinder storage is slow, the DB / response times of the apps will be slow the entire day ?19:55
dansmithwell, if that's what you want to do then sure, but for any real size I think you'll find it quite painful19:57
dansmithconventional virt that is meant to snapshot local disk images in place would be massively more efficient19:57
EugenMayerwell we have done this with proxmox for a long time now, so i at least have some "historical data" that it kind of works out for us. But i understand you concerns19:57
dansmithbut regardless, I'm trying to explain why you're expecting to see proper snapshots and backup automation and aren't finding it19:58
EugenMayeri understand, the concept is different19:58
EugenMayerIs there also a historical reason why freezer seems to be abondened?19:58
dansmiththe same reason anything is abandoned, especially in openstack: nobody cares to use or work on it anymore19:59
dansmithbut to be clear, I don't think freezer did anything other than automate what we've just discussed19:59
dansmithit doesn't fundamentally change anything about the underlying topology19:59
EugenMayeri think freezer used LVM snapshots on the VM itself, to eliminate downtimes. AFAIU20:00
dansmithah, sorry yeah I'm just refreshing20:00
dansmiththis is the inband thing, so requires a client agent20:00
EugenMayerno i think for nova it somehow used nova to get to the instance, not sure though20:01
dansmiththere was something else at one point that just tried to do correlated nova+cinder snapshots of multiple things20:01
EugenMayerit had different modes, also to backup databases and things. Sounded promising to me20:01
dansmiththere's no freezer integration with nova's backing store20:01
EugenMayermight have just missunderstood it. I could not get it working once due to keystone authentication issues20:02
dansmithhttps://docs.openstack.org/freezer/latest/20:02
dansmithseems to clearly show it's inband only20:03
dansmithi.e. fs snapshots in the guest OS20:03
EugenMayerhow do you define inband, maybe i'am not aware of that term this way.20:03
dansmiththe word nova is nowhere on that page20:03
dansmithinband meaning, just treating the instance like any other machine, nothing related to the virt infra around it20:04
dansmithuses keystone for auth, swift (or something else) to store the backup data, but requires running something *inside* the instance20:04
EugenMayerinterestingly this something (agent) in the instance (if you mean the VM) yet not crossed me, odd20:05
EugenMayermust be the Freezer Agent then20:06
EugenMayerYou helped me a lot with your insight, thank you big times!20:08
dansmith"freezer agent...software that runs on the client side, where the data backup is to be executed"20:08
dansmithalso, in the arch diagram,20:08
dansmiththe "node" is the thing with the agent, and it says that can be either "VM, desktop, physical, or windows"20:09
dansmith^ that is why I say it's totally independent of nova, AFAICT20:09
EugenMayeri think before i start adding agent of freezer to my VMs, i will rather use bacula for backups and do the same. The latter is at least here to stay20:09
dansmithyeah, I was just going to say, unless you need the integration with keystone and swift, any other backup solution would probably suffice20:10
dansmithand do much better than entire instance snapshots every night20:10
EugenMayerdansmith you are right, i totally missunderstood the concept, i though of the client (i was wondereing about the wording all the time) as the runner of the job. But in the end, i should have sticked with the smell that "client" does not make sense20:10
dansmithwell, that freezer doc page definitely doesn't seem to lay it out very clearly, IMHO20:11
EugenMayerI think i might think about combining both somewhat, few rare instance backups and regularly incremental bacula20:11
dansmithso it takes a minute to grok20:11
* dansmith nods20:12
EugenMayerThank you for your valuable time!20:12
* dansmith nods again20:13

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