Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments inline in /etc/waagent.conf cause config to not be read #811

Closed
mabicca opened this issue Jul 23, 2017 · 3 comments
Closed

Comments inline in /etc/waagent.conf cause config to not be read #811

mabicca opened this issue Jul 23, 2017 · 3 comments
Milestone

Comments

@mabicca
Copy link

mabicca commented Jul 23, 2017

Hi Guys,

Recently helped with an issue where swap was not being created/activated properly after upgrading the waagent.

It looks like we had these lines in /etc/waagent.conf where you can notice the comments inline (bold):

Format if unformatted. If 'n', resource disk will not be mounted.

ResourceDisk.Format=y #added to enable swap

File system on the resource disk

Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.

ResourceDisk.Filesystem=ext4

Mount point for the resource disk

ResourceDisk.MountPoint=/mnt

Create and use swapfile on resource disk.

ResourceDisk.EnableSwap=y #added to enable swap

Size of the swapfile.

ResourceDisk.SwapSizeMB=2048 #2gb swap size

With these comments, the swap creation was not being done; however after removing the comments, it works as expected.

It was probably some recent change in the waagent that is causing this since older releases do not have this problem.

This was tested in Ubuntu 16.04 LTS and running waagent 2.2.14

@brendandixon
Copy link
Contributor

@mabicca The agent does not support end-of-line comments in its configuration file. Its parse code is quite simple (at present). We can better document this limitation.

@brendandixon brendandixon added this to the 2.2.15 milestone Jul 24, 2017
@mabicca
Copy link
Author

mabicca commented Jul 24, 2017

Hi Brendan,

I guess that was changed recently, with previous versions that was working just fine. Yes, if we can at least document that, it would be great.

Thank you!

@brendandixon
Copy link
Contributor

@mabicca The agent has never accepted end-of-line comments. Odd that it "worked" previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants