-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add repository does not trigger apt-update #285
Comments
Happens because of this change -> 95d3802#diff-40b04cbfcee72a712c6991a38e36b497 What would be needed is |
Thanks, Matthias. I will give it a shot. Since this was intended behaviour in the first place I am happy to close this issue. |
Please don't close the issue, this is definitely something the module should handle. Perhaps @juniorsysadmin has an idea where this code snippet could be placed :) |
Similar entry in puppet-nodejs: |
Yeah, but puppet-nodejs doesn't have the abstraction around the repository logic and uses clear classes for each operatingsystem. This isn't the case for puppet-gitlab. Of course you can just put something like the following in the if $::osfamily == 'Debian' {
Apt::Source['gitlab_official_(ce|ee)'] -> Class['apt::update'] -> Package['gitlab-omnibus']
} Not sure if that's considered good style in a class which seems to be specifically abstracted into something which doesn't really care about the OS. |
We just need to add an |
I'll submit a patch later today. |
@gdowmont thank you for this report. How do you call / use the module ? I would like to understand why the acceptance tests of this module did not catch the issue. Tests call module like this :
|
I had to revert to the previous release for now but the config looked similar to this:
|
During acceptance tests an apt-get update is triggered to be able to install puppet deb package via So i suppose that we have to update unit tests to ensure that update is present in catalog. @LongLiveCHIEF if you agree, can you take care of this in the PR you planed ? |
We didn't have working acceptance test framework until just recently, which is why this didn't come up. I will update tests as needed to cover this along with my patch. |
@gdowmont what version of In version 2.4 and later of You can see that the |
@LongLiveCHIEF It is later than 2.4. Excerpt from metadata.json
|
I think @baurmatt's solution would be the best. I also want to be sure it will actually solve @gdowmont's issue. This abstraction pattern was implemented specifically to allow any version of If he's using |
I know... I wrote it. 😃 Can you confirm that's what is on your system though? Most server/agent infrastructures completely ignore |
😄 Definitely got > 2.4.
|
@gdowmont can you confirm that If everything installs correctly after running the puppet agent twice in a row, it's an ordering problem. If you run puppet twice in a row and it still doesn't update, then I don't think a patch will actually solve your issue. |
The tests I've written so far pass, because of this auto-execution that is triggered by the |
@LongLiveCHIEF Running puppet twice installs gitlab correctly. As you said, it could be ordering problem. |
That's good. That's the result i was expecting. The If it were able to be contained, that would mean that the I'll get crackin ASSAP. Thanks for the additional info @gdowmont . |
Now that #294 is merged I should be able to fix this to work as originally intended. |
Just tried the latest version of the plugin for a new deployment and this issue is still present. |
In version 2.0 of the module apt update is triggered after repos are added but before the package is installed.
In 3.0.2 update is not being triggered and puppet apply fails on the first run as apt cannot find it in the repo.
The text was updated successfully, but these errors were encountered: