Skip to content

augeas error with apache config files - unable to save to file #24274

Closed

Description

@kartiksubbarao

The following state fails with "Error: unable to save to file!":

/etc/apache2/sites-available/default-ssl.conf:
  augeas.change:
    - lens: httpd.lns
    - context: /files/etc/apache2/sites-available/default-ssl.conf/IfModule/VirtualHost
    - changes:
      - set directive[. = "SSLCertificateFile"]/arg /etc/ssl/certs/cert1.pem

If I take out - lens: httpd.lns, it works.

Activity

  1. added
    bug
    severity-medium
    P3
    Platform
    on Jun 5, 2015
  2. added this to the Approved milestone on Jun 5, 2015
  3. jfindlay commented on Jun 5, 2015

    @jfindlay
    Contributor

    @kartiksubbarao, thanks for the report.

  4. eseyman commented on May 3, 2016

    @eseyman

    Wanting to try out augeas' integration with salt, I run into this problem. After working my way up the stack, I realized that you will get this error if you try to make changes to a file that augeas can not parse.

    Since there is no check prior to editing the file that augeas is able to parse it, the error message is one of not being able to save the changed file.

  5. kartiksubbarao commented on May 3, 2016

    @kartiksubbarao
    ContributorAuthor

    As I mention above, if I take out - lens: httpd.lns, it works. The file is saved correctly. I also verified this via augtool directly:

    augtool set '/files/etc/apache2/sites-available/default-ssl.conf/IfModule/VirtualHost/directive[. = "SSLCertificateFile"]/arg' /etc/ssl/certs/cert1.pem

    This works as well.

    Thinking about it some more, it's possible that the problem in this case may have something to do with only loading the httpd.lns lens (and not others that it may depend on?). But I have seen other salt augeas issues that don't necessarily fit into this exact pattern, so I'm not sure whether there may be multiple issues involved.

  6. stale commented on May 1, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

    If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

  7. kartiksubbarao commented on May 1, 2018

    @kartiksubbarao
    ContributorAuthor

    I cannot confirm any change to this issue. I haven't had a chance to test out the most recent version of salt, but I'd like to keep this issue open if possible until it can be confirmed that the issue has been fixed/resolved.

  8. stale commented on May 1, 2018

    @stale

    Thank you for updating this issue. It is no longer marked as stale.

  9. kartiksubbarao commented on May 30, 2018

    @kartiksubbarao
    ContributorAuthor

    The issue is still there in version 2017.7

  10. 18 remaining items

  11. modified the milestones: Aluminium, Approved on Feb 5, 2021
  12. twangboy commented on Aug 31, 2023

    @twangboy
    Contributor

    Closing this issue due to age and lack of activity. Please test this on version 3006.2 and create a new issue if the problem persists. The new issue template has more information and will allow us to track and reproduce the issue more effectively. Thanks!

  13. kartiksubbarao commented on Sep 21, 2023

    @kartiksubbarao
    ContributorAuthor

    @twangboy Reopened as #65254, can you take a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConfirmedPlatformState-Modulebugseverity-medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions