Skip to content

Embed Augeas Httpd lens - #1291

Merged
pde merged 6 commits into
certbot:masterfrom
SwartzCr:issue_809
Nov 6, 2015
Merged

pde merged 6 commits into
certbot:masterfrom
SwartzCr:issue_809

Conversation

@SwartzCr

@SwartzCr SwartzCr commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

add httpd.aug (from v1.4) to the letsencrypt-apache directory and load it when initializing augeas

@SwartzCr

SwartzCr commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

deals with issue #981

@kuba kuba changed the title load augeas httpd lens from inside of lets encrypt [needs revision] Embed Augeas Httpd lens Nov 3, 2015
@kuba

kuba commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

Travis is all red :(

@SwartzCr

SwartzCr commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

I know. None of the tests fail locally, I'm trying to debug :/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if it's safe to call dirname on the resource_filename result... resource_filename might create a temporary file (copy it from the distribution to some location on the disk), especially when zip_safe == True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like Augeas really needs directory. https://pythonhosted.org/setuptools/pkg_resources.html#resource-extraction: "If the named resource is a directory, then all resources within that directory (including subdirectories) are also extracted". So, please move the lens to a subdirectory (letsencrypt-apache/letsencrypt_apache/augeas_lenses/httpd.aug), and use AUGEAS_LENSES = pkg_resources.resource_filename('letsencrypt_apache', 'lenses')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, please leave a comment about it somewhere in the repo, maybe letsencrypt-apache/letsencrypt_apache/augeas_lenses/README?

@SwartzCr

SwartzCr commented Nov 3, 2015

Copy link
Copy Markdown
Contributor Author

I'm still blocked on this, testing it as a local branch here: SwartzCr#3
@kuba do you have any ideas?

@pde

pde commented Nov 4, 2015

Copy link
Copy Markdown
Member

I can confirm that the unit tests pass for me locally.

@kuba

kuba commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

I've just spun up DO droplet with 12.04 x64. It fails with the same errors. It installs libauges0==0.10.0-0ubuntu4, so I guess that is the problem.

@kuba

kuba commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

@SwartzCr, if you still plan on working on this PR, I updated it to use the "right" pkg_resources commands at: https://github.com/kuba/letsencrypt/tree/embed-lens. I also merged with master - you branched from a veryyyyy old commit - that could cause a lot of problems, so try not to do it in the feature and merge before with master without debugging further.

@kuba

kuba commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

@pde pde mentioned this pull request Nov 5, 2015
@SwartzCr SwartzCr closed this Nov 5, 2015
@pde pde reopened this Nov 5, 2015

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is causing the lint error; os isn't used after kuba's commits.

@kuba

kuba commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

Does it work on precise? It's not clear, because of the move to trusty (#1358)...

@pde

pde commented Nov 5, 2015

Copy link
Copy Markdown
Member

The apache plugin doesn't work with it on precise, but the client should be okay. Will double check before merging.

@kuba

kuba commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

So are we effectively dropping support for Ubuntu 12.04 Long Term Support? That does not sound good :(

@domcleal

domcleal commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

Precise appears to have Augeas 0.10.0, so that new lens from 1.4.0 won't work with that version of the library. There was a change/fix to the square lenses in Augeas 1.0.0 so certain newer lenses (Httpd being one) can't be run on 0.x.

@pde

pde commented Nov 5, 2015

Copy link
Copy Markdown
Member

@kuba People on Ubuntu 12.04 will need to use standalone or webroot for now. That's not ideal, but it's better than not being able to handle the stock config in 15.04+

@pde

pde commented Nov 6, 2015

Copy link
Copy Markdown
Member

Did some extra testing. This seems solid on platforms where augeas 1.2+ is available, and seems to degrade gracefully (no apache plugin) on older ones.

pde added a commit that referenced this pull request Nov 6, 2015
[needs revision] Embed Augeas Httpd lens
@pde
pde merged commit a5c0aee into certbot:master Nov 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants