[Bug 1374166] Re: Document how to add swap space on Azure resource disk
Daniel, Defining swap with cloud-config will not result in a persistent swap space across shutdown and restart sequences on Azure. In general, the cloud-config disk setup and/or filesystem stanza will not result in a persisting ext4 ephemeral disk in before mentioned sequences, in which the ephemeral disk often (but strangely, not always) returns to ntfs format. The above suggests (on the one hand) an impossibility to use ephemeral disk space for swap purposes and (on the other hand) a bug in the Azure fabric, causing defined swap spaces to be lost when returning to the ntfs format. Naturally, an added (non-ephemeral) disk can be used for swap purposes, but this is not adviceable. Furthermore, configuring the waagent.conf variables ResourceDisk.Format=y would resolve the Azure fabric issue. In conclusion, cloud-init and the Azure fabric are not really interacting properly, with respect to swap spaces. Any advances on the cloud-init front? Kind regards... -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
Daniel, You are very likely to be correct, I saw the specific code (for recent versions of cloud-init) and it should be able to reformat disks. Questions are: - is the swap created after or before the reformat? (Note: a reformat removes the characteristic persistent from persistent swap) - is the Azure VM image running the most appropriate and/or recent cloud-init version? It often has been the problem that cloud-init versions on Azure Ubuntu VMs are not really up-to-date. However, I will try to test which issues occur (if any), after thursday though. Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
Ben, The patch lp-1422919-azure-g5_ephemeral.patch does not help, when introducing this patch (alone) in cloud-init. There seems to be some basic problem with the basic config settings, in the sense that /dev/sdb is always starting as NTFS. The standard result of the tests are summarized as: checking disks with parted -l does indicate ext4 settings for all disks (even an attached /dev/sdc) after creation, checking disks with fdisk -l indicates that (only) /dev/sdb is a HPFS/NTFS/exFAT device. Note that at creation time, cloud-init (0.7.5-0ubuntu1.3) is not patched. A reboot and/or restart of the VM does not make any difference, the standard result remains. A shut-down/start sequence for the VM, with cloud-init patched (0.7.5-0ubuntu1.3 with lp-1422919-azure-g5_ephemeral.patch), does yield different results: a) a check with parted -l indicates /dev/sdb being ntfs, (and) b) a check with fdisk -l indicates (again) that (only) /dev/sdb is a HPFS/NTFS/exFAT device, and the following varying factors do not have effect: - disk mount locations (persistently correct across all test situations) - using aliases (ephemeral0 and devicename ephemeral0.x) for /dev/sdb or using no aliases (/dev/sdb and devicename /dev/sdb1) - using /dev/sdb table_type: gpt at creation time (not supported by 0.7.5-0ubuntu1.3, but that does not seem to matter) - the /dev/sdb overwrite at disk_setup (this can be False or True) Again note that the /dev/sdc disk is a constant factor, passing parted -l and fdisk -l checks every time. Also note that exceptions on the standard result are caused by defining a swap partition (fs type 82) on the first part of the disk. Any definition in the form of layout: [[100,83]] does not help. In short, cloud-config setting do not change the erratic behavior with respect to /dev/sdb AND the current patch does not either. In fact, /dev/sdc is well-behaved (as one expects), with the only difference (in old and new cloud-init code) that /dev/sdc is not hindered by standard config settings (in the python scripts). In fact (again), the erratic /dev/sdb does not change with settings, in a shutdown/start sequence issue still remains (i.e. /dev/sdb returns to ntfs state), while after VM creation a check with fdisk -l indicates that /dev/sdb is a HPFS/NTFS/exFAT device . All the above suggests that there is one major issue with EITHER standard config settings for /dev/sdb (as present in python code) OR the disk_setup stanza for /dev/sdb. It would be my guess that the disk_setup stanza (for dev/sdb) is the culprit (since overruling the disk_setup stanza for /dev/sdb does not have any effect AND specific, unsupported terms like gpt are ignored fully). By the way, all the above is a preliminary conclusion, I will have a peek into the code, when I have time. Your feedback is welcome! Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Ben, As soon as time is available, I will test the -proposed package (if possible, on the old Azure VMs that have been used for testing). I will add the following test: testing the 0.7.6 version on Ubuntu Trusty (14.04.1 LTS) Please note that I just received the message, implying that I have not been able to verify what is changed in the 0.7.5 version (the standard version on Trusty) and/or whether swap file cloud-config options have been backported. Also note that cloud-init documentation with respect to - cloud-config examples, and/or - Azure custom AND standard disk_setup and fs_setup settings can be adjusted for the reasons that disk_setup and fs_setup settings for attached disks, in the form of #cloud-config disk_setup: [ .. ephemeral config lines .. ] /dev/sdc: table_type: mbr layout: True overwrite: True fs_setup: [ .. ephemeral config lines .. ] - device: /dev/sdc1 filesystem: ext4 suffice to setup and format attached disk at VM creation time (instead of manually partitioning and formatting afterwards). Note that the overwrite: True at /dev/sdc disk setup does not have any impact, in the sense that data on the disk is not lost (!). @Ben: for the sake of clear cloud-init standard settings, it would propably be desirable to remove the alias ephemeral in Azure standard settings, since this removal cannot do harm and makes more easy to reference the /dev/sda (ephemeral) disk. Is this a change to be considered? @Ben: if I am not mistaken, it should be easy for cloud-init to automatically detect attached disks (Azure devices) and assign a standard disk_setup and fs_setup settings (as provided above). The standard settings can than be easily overruled by custom cloud-config settings. However, I am not completely sure whether this is desirable behavior for cloud-init, what do you think? @Stephen: the walinuxagent (waagent script) should be able to create a custom cloud-config file for the automatic detection, setup and formatting of the attached disks (Azure devices), in order to have formatted disks (after creation of the VM) that are persistent across (normal) restarts AND shutdown/start sequences (the latter is normally a problem, not in this case). Can we expect some adjustment of the walinuxagen (waagent script)? Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Daniel, The documentation is not okay: the swap partition (on the last part of a disk) will not persist through shutdown in Azure. The strange thing is: a) often a NTFS formatted ephemeral disk reoccurs when starting up after a shutdown, b) a swap partition on the FIRST part of a disk IS persistent through shutdown in Azure. Please shed a light on the above. Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1292648] Re: [SRU] cloud-init should check/format Azure empheral disks each boot
@Ben, Bug returns, the issue is still present in 0.7.5-0ubuntu1.3, when partitioning the ephemeral disk. Interestingly, a partitioning of form - [ 66, [33,82]] does return the bug (the whole /dev/sdb becomes ntfs after shutdown). Bug is persistent through resizing. - [ [ 33,82], 66] does not yield any problem at all. Persisten through resizing (resizing does not matter in this case). Maybe I did something wrong with the cloud config syntax, but that should not be the case. Still testing all scenario´s. Any idea of the strange situation? Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1292648 Title: [SRU] cloud-init should check/format Azure empheral disks each boot To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1292648/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Dan(iel), I will post two new bugs (that are not really bugs, but a wish for code improvement): - size logic (for both swap space as swap partitions) - swap stanza that allows changes of swap file size (not swap partitions) on a created/running VM to be persistent By the way, if necessary, I am willing to contribute to the documentation and/or cloud-init source code. Just let me know Ciao... -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Steve, I am working on a solution to pass some local cloud-config settings, for swap space settings and other settings. One idea is to change the AzureDataSource.py script, in order to allow it to read from waagent.conf and/or other config files. The possibility exists, given the fact that a user data file and a cloud-config.txt file are existing on the created instance. The advantage of using cloud-init (instead of CustomData and/or ovf- env.xml) is that the cloud-init syntax (and scripts) can be used. In fact, the only challenge is to have cloud-init read an additional datasource (on the created VM) at shut-down and/or start-up. I do not have much time the coming days, but I´ll keep you posted. Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Daniel, The documentation looks great. However, can you add the following (important) remarks to the documentation page: a) as from cloud-init 0.7.6, the option exists to create swap by means of the swap stanza b) in good practice, swap partitions should be at the start of the disk (and a function of the size of memory available) Also note that your documentation is very suitable, if adapted slightly, for general documentation about creating partitions. As a personal (and internal) note, the following: - the new swap stanza (in newer versions of cloud-init) are automatically determined with some code logic, this should also be applied to swap partitions (and that is possible, since the settings are only applied on provisiniong or a restart of the VM), - in general, cloud-init should be able to detect existing swap files and/or swap partitions and leaving them as is, when restarting a VM (instead of creating them again, as happens at this moment, with swap files and swap partitions). In essence, a restart (a shut-down and start-up sequence) should not be required to CHANGE swap space. Can you react on the above personal notes? Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410835] Re: Azure ephemeral disk and custom mount points
Daniel, I was aware of DataSourceAzure.py and cc_mounts.py and the fact that built-in config for Azure requires declaration of sdb (and not ephemeral0). The before mentioned fact is only an inconvenience for users that would like to declare custom mount points and make the mistake to use an in incorrect reference to the ephemeral disk (i.e. not declaring sdb). The misdeclaration will only result in the ephemeral disk not being mounted, that should not be a real issue. However, the above reveals a (minor) bug in cc_mounts.py. The cfg mnt array in the cc_mounts.py script is sanitized, in such a fashion that default mounts are only added if other entries do not have the same device name (see lines 285 - 307). A declaration of [ sdb, mount point ] or [ sdbX, mount point ] (in case of partitions) in custom cloud config settings will not result in an append of the ephemeral0 default mount (since the device name remains the same) and that is good. After all, when declaring [ sdb, mount point ] or [ sdbX, mount point ] (in case of partitions), cc_mounts.py will append device /dev/sdb or /dev/sdbx (in case of partitions) to the cfg mnt arry, instead of the default mount declarations for ephemeral0. This is really cumbersome, when using partitions and certainly when using swap (dedicated) partitions. The bug is (in essence) that the sanitizing in cc_mounts.py does not prevent that the standard alias /dev/sdb, as specificied in DataSourceAzure.py, or any other declared aliases will be appended to the cfg mnt array, which should not occur, if these aliases are pointing to one and the same ephemeral disk. The (minor) bug can be easily resolved by sanitizing for aliases in cc_mounts.py. I was (also) aware that cc_mounts.py contains the declaration [swap, none, swap, sw, 0, 0] in the default set of mounts and that DataSourceAzure.py does not have to contain any reference to swap or mount points thereof. However, the accidental declaration of [ swap, mount point or None ] reveals a bug, that occurs even when a declaration of the form [ sdb, mount point ] is provided in cloud-config settings. The bug is, in my humble opinion, (solely) related to the following lines of code in cc_mounts.py: for line in actlist: # write 'comment' in the fs_mntops, entry, claiming this line[3] = %s,%s % (line[3], comment) if line[2] == swap: needswap = True if line[1].startswith(/): dirs.append(line[1]) cc_lines.append('\t'.join(line)) with these lines of code stating that any device called swap (or /dev/swap, since that is the same in cloud-init) a) will mount, as a result of if line[1].startswith(/): dirs.append(line[1]) if only if - the declaration is of form [ swap, mount point ] AND - the device called swap actually exists, for instance as a result of the existence of swap partitions AND - the swap partition is declared first in the disk_setup cloud-config settings, b) will not mount, as a result of (taking into account defvals = [None, None, auto, defaults,nobootwait, 0, 2]) if line[2] == swap: needswap = True if the declaration is of form [ swap, None ], with the missing fields hence being replaced by appropriate values from defvals, hence implying that line[2] == swap never applies, c) will not mount properly, if the declaration is of form [ swap, mount point or None, swap ], d) will not mount at all, if the declaration is of form [swap, none, swap, sw, 0, 0], due to sanitizing in cc_mounts.py, and one could therefore come to the obvious conclusion that the bug is related to the definition of defvals. However, the obvious conclusion is not appropriate in this case. In essence, one should not be able to declare [ swap, mount point or None ] (or similar) at all (!). Furthermore, a declaration for swap only makes sense when using swap partitions, but swap partitions are not desirable at all. Moreover, the cloud-init versions 0.7.6 and 0.7.7 already allow for the creation of swap files. In short, the bug can and should be resolved by sanitizing (i.e. ignoring) any declarations of the form [ swap, mount point ] and [ swap, None ] or similar, hence also implying that even the [ swap ] declaration has no function in case of sanitizing. In my humble opinion, the swap bug can and should be resolved quickly. Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410835 Title: Azure ephemeral disk and custom mount points To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410835/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410835] Re: Azure ephemeral disk and custom mount points
@Daniel, I just read your latest (two) posts, I was not able to read them while commenting, my apologies. The makeswap bug (when using partitions) is very different from the swap bug and the alias bug. In short: - the swap bug can be resolved by sanitizing declarations of form [ swap, x, x, ... ] - the alias bug can be resolved by adding some code to check for double entries in the cfg mgt array, due to aliases Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410835 Title: Azure ephemeral disk and custom mount points To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410835/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374115] Re: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure
@Stephen, The mount location CAN be changed by setting - ResourceDisk.Format=y (instead of n) AND - ResourceDisk.MountPoint=/opt (or any other directory, instead of /mnt) in waagent.conf. The change becomes effective after a shutdown and start-up sequence (and I assume the same applies to a normal restart). The mount location cannot be changed, if and only if ResourceDisk.Format=n. Also note that the ResourceDisk.MountPoint variable in waagent.conf can be blank, in which case the standard mount point will be used by cloud- init, being /mnt. All the above already leaves the question why ResourceDisk.MountPoint should be present in waagent.conf, given that - most of the work is done by cloud-init and cloud-config settings, - the ResourceDisk.MountPoint is only working in combination with ResourceDisk.Format=y, - the specification of mount points should not be limited to only the resource (ephemeral) disk, and so on. In essence, the Azure Datasource, used by cloud-init, should be able to push some flexible configuration of variables to cloud-init. As a result, a desire to change many variables will require that 1 - a (huge) number of variables is added to waagent.conf, with corresponding code in waagent script, OR 2 - the Azure Datasource should be WRITEABLE, allowing the change of cloud-config settings without specifying CustomData at provisioning time and (therefore) the changed cloud-config settings becoming effective at shut-down and start-up sequences, and, to be honest, the proper and efficient way of doing things should be method 2. Kind regards... -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374115 Title: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374115/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Daniel, I did all the testing before and came to the same result (as you are probably aware of) BUT with a different CONCLUSION. I personally concluded that the use of swap partitions, if ever desirable, is (also) not desirable in the current case AND certainly not on an ephemeral disk, given that: 1 - a swap partition at the beginning of a device/disk can be efficient, but will lead to a waste of disk space, with this being static, 2 - a huge swap partition (if someone makes that strange mistake) will result in severe problems and performance issues, 3 - a swap partition at creation time considerably reduces provisioning speed/performance, 4 - a swap partition can become huge (i.e. too large) if a VM is upgraded to a larger size (with a larger ephemeral disk), 5 - an OPTIMAL swap partition should be a function of memory (similar to logic introduced with cloud-config setting swap). Moreover, the swap partition as such can become obsolete, given the swap function(s) in cloud-init versions 0.7.6 and 0.7.7. In short, I have an issue with the procentual division of the disk, into a normal partition and a swap partition. The percentage assigned to the swap partition should be able to allow for - automated calculations of the percentage (via logic, to optimize swap space) - manual overrides of the automated calculations Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374115] Re: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure
@Stephen, I think you know why I stated that the ResourceDisk.Format variable is a remarkable explanation for specific behaviour of waagent. It must also be clear why I (also) stated that some parts of the waagent script are rather obsolete or unnecessary. A huge part of the waagent script can be discarded when allowing cloud- init to do the work, including those parts of the waagent script that are aiming on specific distro´s, since cloud-init also takes care of distro-specific code. However, allowing cloud-init do to all the work, will only become a huge advantage if 1 - the corresponding (Azure) Datasource can be written to, AND/OR 2 - waagent.conf is designed to be an addition (i.e. customizable extension) to a (for security reasons non-writeable) Datasource, with Datasource referring to the file used by cloud-init. Is option 2 achievable? And how can I test that? Finally, note that the introduction of cloud-init version 0.7.6 in the Ubuntu images would be desirable: this version of cloud-init works fine in Trusty (14.04.1 LTS) and also has the option to create swap with (advanced) cloud-config settings. Can this new cloud-init version be introduced? Kind regards. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374115 Title: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374115/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410824] Re: Swap space with mounts module not working
@Scott, At the moment, the dd command is being used in version 0.7.6 of cloud- init, with a noticeable impact on provisioning speed. Is it possible to use the fallocate command? This would also be convenient for resizing swap space, for instance by using fallocate -o option. Kind regards PS The impact on provisioning speed can be the result of Azure, since Azure seems to be have some performance issues at this time. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410824 Title: Swap space with mounts module not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410824] Re: Swap space with mounts module not working
@Scott, The output info is not that detailed, I get something like Jan 16 01:23:12 swap1 [CLOUDINIT] util.py[DEBUG]: Cloud-init v. 0.7.5 finished at Fri. when creating a Linux VM on Azure, with Ubuntu 14.04.1 LTS. The cc_mounts.py does certainly not include the new code for the swap file. I have no (simple) option to launch a Trusty with a new version of cloud-init. A simple Utopic (14.10) launch is indeed creating a persistent swap, rather stating the obvious. Can you make this package (version 0.7.6) available for 14.04.1 LTS (Trusty)? That would be much appreciated. Furthermore, any documentation would be much appreciated. Note that I will post some other comments (or bugs, if any) in this topic, since I am testing some alternative scenarios. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410824 Title: Swap space with mounts module not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410824] Re: Swap space with mounts module not working
@Scott, By the way, the release 0.7.6 is ready for packaging, if I am not mistaken. Note that the package above AND the 0.7.7 version can be used in Azure Linux VMs with Ubuntu 14.04.1 LTS (Trusty). Performance seems to be improving on the Trusty machines, if using the latest packages. Also note that upgrading the package in a running VM (Trusty) with CustomData containing a fixed swap size, will result in a swap with that fixed size after a shut-down and start sequence (even if a previous version, such as 0.7.5, did not create swap at all). The above should imply that on Azure, the custom data option and/or a datasource can be used to fix swap size at start or restart. An advantage thereof is that the implementation of a swap size of zero or another minimum amount, with the possibility to grow the swap size automatically, in specific circumstances. These circumstances could or should be: - changing the VM size (is probably tackled by the cloud-init versions 0.7.6 and 0.7.7) - changing swap size manually (in a running VM) - changing swap size in waagent.conf (if relevant and/or desired) Kind regards.. PS Please introduce the 0.7.6 in Trusty, that would be a partion solution to many problems encountered for users of Trusty VMs. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410824 Title: Swap space with mounts module not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410835] Re: Azure ephemeral disk and custom mount points
@Stephen, The non-persistence of device names is indeed a bug, even though device names can be declared by cloud-config settings. With respect to the Azure Linux Agent, it should be noted that one has the option to use a standard declaration of device names (and partitions, if desired), instead of taking the autodetection approach. The above option has the advantage that it allows for and/or can allow for a - (persistent) fixation of device names, b - (persistent) configuration of device names (and even partitions, if desired) in waagent.conf, c - removal of multiple lines of code in the waagent script, and it must be emphasized that the above implies that, in essence, the approach of using CustomData for injecting cloud-config settings becomes less relevant or even obsolete, if and only if the waagent script allows for using waagent.conf variables in the cloud-init sequence. In short, there are some possibilities for the improvement of the waagent script and the proper functioning thereof. Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410835 Title: Azure ephemeral disk and custom mount points To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410835/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410824] [NEW] Swap space with mounts module not working
Public bug reported: The cloud config settings # swap can also be set up by the 'mounts' module # default is to not create any swap files, because 'size' is set to 0 swap: filename: /swap.img size: auto or size in bytes maxsize: size in bytes will not result in a swap space. Some big questions are present with respect to the operational logic behind this cloud config setting: a) which (underlying) command is used to create the swap space? b) is being made use of sparse files? (not desirable for swap. Answer is probably not, given size: auto option) c) what are the requirements for creation of swap? (should a partition exist and/or should the partition type be 82. Answer is probably no, given the fact that a swap file is created) In essence, some problems encountered when creating swap manually (instead of using the swap config setting): 1) when creating a swap file on the ephemeral disk: mkswap does not work probably (error: ...should at least be 40Kib) 2) when creating a separate partition of type 83 (hence preventing mkswap errors): - swap file (manually created) exists, but is not active as swap, - swap file (using the swap config setting) does not exist, 3) when creating a swap partition (of type 82): swap is not active and/or not mounted (and swap file creation therefore fails) Note the use of partitions is not desirable for swap purposes, the sole intent was to test for the causes of failure. Finally, some additional documentation for creating swap space with cloud-config would be (very) desirable). Kind regards ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410824 Title: Swap space with mounts module not working To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1410835] [NEW] Azure ephemeral disk and custom mount points
Public bug reported: The creation of custom mount points with cloud-config, when creating a (linux) VM in Azure, is fairly simple, with some caveats. However, the format [ ephemeralX, mount point ] is not working properly, even when explicitly declaring device aliases. The format [ sdb, mount point ] or [ sdbX, mount point ] is working properly. The above is not really a bug, but an inconvenience that can require some improvement. In addition, note the following. An accidental declaration of (something similar like) [ swap, mount point or None ] will result in the ephemeral disk not being mounted at all, even if a declaration of missing fields is applied. The above is a bug, in the sense that a (mis)declaration in (custom) config settings should not result in an unmounted ephemeral disk. The same results apply, when partitioning the ephemeral disk to contain a swap partition of type 82 and assigning the partition to a specific device (a change in fs_setup does not affect the results in any way), in order to have a possibility to declare [ swap device, mount point ] and therefore having a mounted disk/device with Linux swap partition. The swap partition will not function as a swap space after boot and/or a swap file, when created at boot, on the swap partition will not be active. In essence, the creation of a swap partition will lead to a) only (!) the mount of the swap space (if the swap partition is declared first in the disk_setup, like for instance disk_setup: ephmeral0: table_type: 'mbr' layout: - [33, 82] - 66 overwrite: True ), OR b) the mount of the disk partition (if the swap partition is declared last), with the disk partition being smaller than the whole ephemeral disk (as result of the disk setup). The above has only been executed for testing purposes, these scenarios do not have to occur in reality. In conclusion, in creation of Azure (linux) VMs, two (potential) bugs exist: - the failure to create custom mount points when referring to ephemeral0 (the proper name of the disk in Azure), - the dangers of and/or issues with declarations regarding swap mounts. Kind regards. ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1410835 Title: Azure ephemeral disk and custom mount points To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410835/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1311463] Re: disk-setup unable to partition disks
Problem should not occur on Ubuntu Trusty 14.04.1 LTS -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1311463 Title: disk-setup unable to partition disks To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1311463/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374115] Re: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure
The mount location can be reconfigured in the waagent.conf file, after provisioning of the VM. A shut-down and start-up sequence is required, in order to let the changed settings become effective. It is not desirable and/or advisable to change partitioning and/or mount locations on creation time. It is also not desirable and/or advisable to change partitioning of the resource (ephemeral) disk, given the fact that this disk is not really intended for persistent data storage and the fact that one minor change in settings (changing ResourceDisk.Format=n to ResourceDisk.Format=y) will result in a loss of all data and partitioning settings (!). When requiring a (persistent) data disk, please attach an additional data disk (with all freedom available, for custom configuration of partitioning and/or mount points). Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374115 Title: Allow cloud-config to modify partitioning and mount point of temporary resource disk in Azure To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374115/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1374166] Re: Document how to add swap space on Azure resource disk
@Cracco, The discussion has to do with creating (persistent) swap space, on the resource (ephemeral) disk, without adding additional disks. In essence, you provide a solution, but the solution ignores the possibility to use some of the unused disk space on the resource disk. Furthermore, your solution is rather inflexible, if swap space has to be resized. Kind regards -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to cloud-init in Ubuntu. https://bugs.launchpad.net/bugs/1374166 Title: Document how to add swap space on Azure resource disk To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1374166/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs