Skip to content
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

proxy no longer working when using apt::key with "source" param. #1037

Open
jsfrerot opened this issue Jun 17, 2022 · 4 comments
Open

proxy no longer working when using apt::key with "source" param. #1037

jsfrerot opened this issue Jun 17, 2022 · 4 comments

Comments

@jsfrerot
Copy link

Describe the Bug

With olderversion of apt module this used to work:

    apt::source { 'elastic-7':
      comment  => "Elastic packages 7",
      location => "http://artifacts.elastic.co/packages/7.x/apt",
      release  => 'stable',
      repos    => 'main',
      key      => {
        'id'     => '46095ACC8548582C1A2699A9D27D666CD88E42B4',
        'source' => 'https://artifacts.elastic.co/GPG-KEY-elasticsearch',
        'proxy'  => "http://${::location}-aptcacher-001.mydomain.com:3142/",
      },
      include  => {
        'deb' => true,
      },
    }

Now this timeout:

Error: Could not set 'present' on ensure: execution expired (file: /opt/data/puppet_git/modules/apt/manifests/key.pp, line: 54)
Error: Could not set 'present' on ensure: execution expired (file: /opt/data/puppet_git/modules/apt/manifests/key.pp, line: 54)
Wrapped exception:
execution expired
Error: /Stage[main]/repos::Elastic7/Apt::Source[elastic-7]/Apt::Key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic-7]/Apt_key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic-7]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: execution expired (file: /opt/data/puppet_git/modules/apt/manifests/key.pp, line: 54)
Notice: /Stage[main]/repos::Elastic7/Apt::Source[elastic-7]/Apt::Key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic-7]/Anchor[apt_key 46095ACC8548582C1A2699A9D27D666CD88E42B4 present]: Dependency Apt_key[Add key: 46095ACC8548582C1A2699A9D27D666CD88E42B4 from Apt::Source elastic-7] has failures: true

Expected Behavior

Be able to provide proxy information when using "source" parameter to key.

Environment

  • Version 8.4.0
  • Platform ubuntu 20.04

Additional Context

Thw workaround I have for now is to use

      key      => {
        'id'      => '46095ACC8548582C1A2699A9D27D666CD88E42B4',
        'server'  => 'keyserver.ubuntu.com',
        'options' => "http-proxy=\"http://${::location}-aptcacher-001.mydomain.com:3142\"",
      },

But this works only when the key is available in keyserver.ubuntu.com

@brightdroid
Copy link

I think it should use configured apt::proxy. Thank you in advance.

@github-actions
Copy link

Hello! 👋

This issue has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which issues need our attention.

If you are waiting on a response from us we will try and address your comments on a future Community Day.

Alternatively, if it is no longer relevant to you please close the issue with a comment.

@dhs-rec
Copy link

dhs-rec commented Sep 28, 2022

BTW: Why does this have a proxy setting at all? Couldn't it be taken from Puppet config?

@dhs-rec
Copy link

dhs-rec commented Oct 5, 2022

This needs to be overhauled anyway because of #1034.

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

No branches or pull requests

5 participants