-
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
will not parse my.cnf if any !include directives are present #113
Comments
Can you paste the exact line that fails, and the error returned by running |
update - ANY key that starts with a ! will cause the file to be unparseable. If I add a line from the 0.9.0 lens, it does seem to fix it, but I'm not sure what other ramifications it has. ie this diff: --- /root/mysql.aug.dist 2014-05-22 17:07:30.000000000 -0700
+++ /root/mysql.aug.fixed 2014-05-22 17:38:45.000000000 -0700
@@ -20,6 +20,7 @@
in [ Util.indent . key IniFile.entry_re . sep . Sep.opt_space . bare . (comment|IniFile.eol) ]
| [ Util.indent . key IniFile.entry_re . sep . Sep.opt_space . quoted . (comment|IniFile.eol) ]
| [ Util.indent . key IniFile.entry_re . store // . (comment|IniFile.eol) ]
+ | [ key /\![A-Za-z][A-Za-z0-9\._-]+/ . del / / " " . store /\/[A-Za-z0-9\.\/_-]+/ . (comment|IniFile.eol) ]
| comment
(************************************************************************ the above patch to mysql.aug will fix it. In answer to your previous questions, "augtool print /augeas//error" returns this:
Here's the top part of the config that fails to parse, including the affected line (it's the !includedir line).
|
ugh. this message board does NOT like unified diff posted into it. I think you can still see what I'm getting at with that, but let me know if you want the actual diff mailed somewhere. |
It does, if you use the proper syntax to paste code. See https://help.github.com/articles/github-flavored-markdown |
Are you sure you are using the official lens from 1.0.0? It should have a line to parse |
Is this still an issue ? |
Yes, I actually tested it yesterday with the latest augeas on one of my augtool print /files/etc/my.cnf As long as the !include is present in the file. Without !include, it works On Fri, Apr 3, 2015 at 1:40 PM, David Lutterkort [email protected]
|
The issue is actually not the include directive itself, but that Augeas parses that in a way that ends whatever section it appears in. The error happens on the line starting with Not sure how to fix that though .. we'd probably have to accept that line as part of the |
However it works in 0.9.0, it was OK then :) Let me know if you want me to On Thu, Apr 9, 2015 at 9:50 AM, David Lutterkort [email protected]
|
… of sections CentOS 6.6 (at least) ships with a mysql.conf that has a !include directive in the middle of a section. To accomodate that, we pull !include directives into the sections in which they appear rather than having htem end the section. That's the incompatible change: these directives now appear underneath /target/!include rather than at /!include Fixes hercules-team#113
In 0.9.0, my my.cnf parses fine. With 1.0.0 or newer, it does not. If I take out the !include /sub/path.d/ directive, it works, but obviously I need that in there. I saw in the changelog that something changed regarding !include directives, but it appears to have broken this functionality and is locking me into 0.9.0.
The text was updated successfully, but these errors were encountered: