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

artifact_info url returned is packages.chef.io versus what is set in PACKAGE_ROUTER_ENDPOINT environment variable #270

Open
jasonwbarnett opened this issue Nov 5, 2018 · 1 comment

Comments

@jasonwbarnett
Copy link

jasonwbarnett commented Nov 5, 2018

Version:

v3.11.2

Environment:

RHEL 5 + Chef 12.22.5

Scenario:

I am trying to use a mirror (behind corporate firewall) by using the PACKAGE_ROUTER_ENDPOINT environment variable so that artifact URLs returned are the mirror URL instead of packages.chef.io URL.

Steps to Reproduce:

$ chef exec irb
irb(main):001:0> require 'mixlib/install'
=> true
irb(main):002:0> ENV['PACKAGE_ROUTER_ENDPOINT'] = 'https://packages-mirror.domain.com'
=> "https://packages-mirror.domain.com"
irb(main):003:0> Mixlib::Install.new({:product_name=>"chef", :platform_version_compatibility_mode=>true, :platform=>"el", :platform_version=>"5", :architecture=>"x86_64", :channel=>:stable, :product_version=>'13'}).artifact_info.url
=> "https://packages-mirror.domain.com/files/stable/chef/13.12.3/el/7/chef-13.12.3-1.el7.x86_64.rpm"
irb(main):004:0> Mixlib::Install.new({:product_name=>"chef", :platform_version_compatibility_mode=>true, :platform=>"el", :platform_version=>"5", :architecture=>"x86_64", :channel=>:stable, :product_version=>'13.6.4'}).artifact_info.url
=> "https://packages.chef.io/files/stable/chef/13.12.3/el/7/chef-13.12.3-1.el7.x86_64.rpm"
irb(main):005:0> Mixlib::Install::VERSION
=> "3.11.5"

Expected Result:

I would expect that the PACKAGE_ROUTER_ENDPOINT URL would be returned by artifact_info.url regardless of the options passed.

Actual Result:

When specifying a more specific version, it returns the packages.chef.io instead of the value of PACKAGE_ROUTER_ENDPOINT

@jasonwbarnett
Copy link
Author

jasonwbarnett commented Nov 5, 2018

@tas50 oddly if I switch platform_version from 5 to 7 it works as you would expect. I wonder if this is related to #269.

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

No branches or pull requests

1 participant