/srv/irclogs.ubuntu.com/2021/06/25/#cloud-init.txt

aaii_needs-help-guy, What you need? :o01:29
=== aaii_ is now known as aaii
=== aaii_ is now known as aaii
=== aaii__ is now known as aaii
andrewbogottI have this in my cloud-init conf:13:57
andrewbogotthttps://www.irccloud.com/pastebin/opt2FxzR/13:57
andrewbogottnevertheless my ephemeral disk is getting formatted with 'vfat'.  Is there a way I can tell cloud-init to do nothing with the volume rather than (as it seems to be doing now) default behavior?13:57
rharperandrewbogott: are you on Azure ?  that's the only cloud that I know of that has default configuration for formatting an ephemeral disk;  cloud-init doesn't have default values for those keys, rather they're omitted.  on Azure, there's built-in cloud-config which includes those keys to configure the ephemeral disk.    I think if you set them to something else, like disk_setup: disabled or such; that should replace the built-in 14:15
rharperconfig when it merges and if the config isn't valid should ignore it.  The default format of azure's ephemeral disk is NTFS formatted. 14:15
andrewbogottopenstack14:15
andrewbogottI will dry 'disabled' for my next test, thanks!14:15
andrewbogottof course it's also possible that something other than cloud-init is formatting14:16
rharperah, let me look at the openstack datasource, it too has some defaults for ephemeral formatting14:16
rharperoh, IIRC, the openstack metadata service typically includes config for the ephemeral disk as well;14:17
otubosmoser: quick question on growpart. I've read the whole file but I might be missing something: does this script is self contained? Does it use any other script in the repository?14:23
rharperthe openstack metadata service typically includes a 'block-device-mapping' config which controls this, https://docs.openstack.org/nova/queens/user/block-device-mapping.html ;  14:24
rharperandrewbogott: but, AFAIK, the ephemeral disk is already formatted and mountable;  Azure is the only datasource which *reformats* the disk for linux since it's disk is NTFS formatted by default; so if you're getting VFAT on a disk, I suspect that's the cloud's doing.   if you like, I can examine a  cloud-init.log to see what happened. 14:26
andrewbogottrharper: thanks, I'll check the logs as well14:27
* andrewbogott stops reading cloud-init docs and starts reading openstack docs14:29
otubosmoser: nevermind, I think I found my problem :-D14:38
smoserotubo: sorry, iddn't see. i think the answer is yes. it is self contained.15:24
smoserandrewbogott, rharper  it hink that openstack might present a FAT filesystem based on configuration 15:29
andrewbogottsmoser: looks like, although I can't figure out how to configure it so far15:30
* smoser cloning source15:30
smosersomehow that got big!15:30
rharperI saw block-device-mapping has a v2 ... which is more interesting ... that'd be nice to support that in cloud-init 15:32
rharpersmoser: right,  I suspect this is related to what block service configuration is used ... the classic cinder exposed a disk with ext(something) on it  ...   15:33
smoserhttps://github.com/openstack/nova/blob/9311f541499f711de064505fab3b24e20451d433/nova/conf/compute.py#L12915:34
smoseri swear you can configure that on a image basis, but i dont see it.15:36
smosermaybe you can on launch? in the block device mapping... 15:38
smoser nova/block_device.py:15:38
smosersorry. paste fail15:38
smoser https://wiki.openstack.org/wiki/BlockDeviceConfig15:38
rharperI've done block-device-mapping, but you need to create the storage first (at least in cinder) and then map the cinder device to the VM (at launch or afterwards) 15:40
rharperso maybe something other than cinder creates vfat devices by default 15:41
andrewbogottflavor lets me specify an ephemeral disk size, that's what I'm using. As far as I know it doesn't let me set anything beyond size though...15:41
andrewbogottI'm thinking 'what to do with ephemeral storage' must be a cloud-wide setting15:41
rharperyeah, I wouldn't expect any controls; what block device provides ephemeral storage is likely a cloud-level config 15:41
rharperright15:41
andrewbogotttroubling that default_ephemeral_format doesn't even take a 'vfat' setting and yet that's what I'm getting15:42
rharperone way to test is to allocate a new block device (from whatever block service you have) and attach it to a running instance, and then you can inspect the newly added disk for what fs is on it, etc ... 15:42
andrewbogottI'll try setting it to None and see what it does :)15:42
andrewbogottOh, newly created cinder volumes are definitely unformatted15:43
andrewbogottAnd I have a bunch of code that supports that behavior (formatting in puppet later on)15:43
rharperit could be a portability setting ... cross OS filesystem 15:43
andrewbogottso I just want ephmeral volumes to be... also like that15:43
rharperwell, that's counter to ephemeral volumes IIUC, they're always preformatted so they're mountable by default rather than waiting for (or requiring) the OS in the instance to do the work; 15:44
andrewbogottyeah.  It happens that in our cloud we're only using them for this one particular case15:44
andrewbogottBut it might be that 'don't format' isn't supported on the backend, for the reason you just said15:45
rharpervirt_mkfs = [] 15:48
rharper(Multi-valued) Name of the mkfs commands for ephemeral device.15:48
rharperThe format is <os_type>=<mkfs command>15:48
rharperhttps://docs.openstack.org/ocata/config-reference/compute/config-options.html 15:48
rharperappears to be configurable on the compute side 15:49
andrewbogottyou are way ahead of me15:57
andrewbogottseems like virt_mkfs probably keys off of something else that specifies the format?15:57
andrewbogottalthough I can break it on purpose15:57
rharperlooks to me like it's a compute side config value, set on each compute node 15:58
rharperI wonder if the flavor has an OS setting ? 15:59
rharperit's a list of pairs, OS Type -> mkfs.foo ... so some OS value results in a mkfs.vfat ... I'd think that OS Type == Windows, is going to get you a mkfs.vfat .. where as  OS Type == Linux should get you mkfs.ext4 or so ... 16:00
* andrewbogott nods16:06
andrewbogottmakes sense16:06
andrewbogottI'm checking in with the affected user now, they might be happy with it just being ext4 instead of vfat (which is easy to fix, that's just default_ephemeral_format)16:10

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!