-
Notifications
You must be signed in to change notification settings - Fork 200
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
cannot parse /etc/fstab with trailing "," in the fs_mntops field #832
Comments
can you provide a PR with a fix? |
I will try to at some point, although I'm pretty busy at the moment. The first comment does contain a test case which should be reproducible anywhere if you're just interested in seeing the failure. |
Hello, I started to work on this one, but I've failed every time.
This one failed with:
2: Add a new lens
Failed with:
From the code, I understand that with this solution there is a problem in PUT direction but I don't know how to solve it. Please advise on how I may tackle this one. Thank you |
Hi Cosmin, I haven't had a chance to examine this at length, but can I suggest for (1) above use:
This is required because
is not valid, and would match the original sep2 above Regards, |
With your solution,
but the tests are failing:
test_fstab.aug:
|
Hi @tupyy I can reproduce the error above, and I noticed that the error is at the end of the line. It seem like the existing Fstab lens requires a newline at the end of each line, for the "syntax" to be "complete". Adding the newline explicitly in the string like this:
makes the error go away. I notice that all the other unit tests in test_fstab.aug also have an explicit "\n" at the end of the string being tested |
@georgehansper nice catch. Thanks. I'll make the PR |
Thanks for the PR Can I ask for a couple of small things
|
@georgehansper done. Thank you for the review |
This PR adds a new lens that allows a comma after the last option: /dev/mapper/foo-bar / xfs defaults, 0 0 Fixes: hercules-team#832 Signed-off-by: cosmin@redhat.com
Hi @tupyy One last thing just occurred to me. The original lens used In the interests of avoiding unnecessary changes, we should make
Can I ask you to make this change to PR #838 ? |
This PR adds a new lens that allows a comma after the last option: /dev/mapper/foo-bar / xfs defaults, 0 0 Fixes: hercules-team#832 Signed-off-by: cosmin@redhat.com
@georgehansper done. |
This PR adds a new lens that allows a comma after the last option: /dev/mapper/foo-bar / xfs defaults, 0 0 Fixes: #832 Signed-off-by: cosmin@redhat.com Signed-off-by: cosmin@redhat.com
Note extra "," in the fourth field. Apparently the tools which normally parse fstab are fine with that.
Augeas fails to parse the file at the extra "," character.
The text was updated successfully, but these errors were encountered: