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

Add CINC to product matrix #389

Closed
wants to merge 4 commits into from
Closed

Add CINC to product matrix #389

wants to merge 4 commits into from

Conversation

mrswadge
Copy link

@mrswadge mrswadge commented Jul 24, 2023

The chef_client_updater needs the cinc product adding to mixlib-install so that it can support cinc-client upgrades.

Description

I've been trying to get a cinc-client upgrade from 15.6.10 to work to 18.2.7, but this fails with the latest mixlib-install gem (3.12.27) and the latest sources of https://github.com/chef-cookbooks/chef_client_updater (3.12.1).

An additional change is required in https://github.com/chef-cookbooks/chef_client_updater/blob/main/providers/default.rb to make the upgrade process work as below. See chef-cookbooks/chef_client_updater#252

def legacy_conf_dir_name
  if defined?(::ChefUtils::Dist::Org::LEGACY_CONF_DIR)
    ::ChefUtils::Dist::Org::LEGACY_CONF_DIR
  elsif new_resource.product_name == 'cinc'
    'cinc-project'
  else
    'opscode'
  end
end

For me, this was enough to get the upgrade working.

Related Issue

chef-cookbooks/chef_client_updater#228
#339
chef-cookbooks/chef_client_updater#249

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

The chef_client_updater needs the cinc product adding to mixlib-install so that it can support cinc-client upgrades.
@mrswadge mrswadge requested review from a team as code owners July 24, 2023 15:02
Copy link
Author

@mrswadge mrswadge left a comment

Choose a reason for hiding this comment

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

I've added the sign off to the commit.

mrswadge added 2 commits July 24, 2023 16:13
The chef_client_updater needs the cinc product adding to mixlib-install so that it can support cinc-client upgrades.

Signed-off-by: Stuart Stephen <[email protected]>
mrswadge added a commit to mrswadge/chef_client_updater that referenced this pull request Jul 24, 2023
The directory name is incorrect when upgrading CINC. This change fixes the path.

This change is coupled with chef/mixlib-install#389.

Signed-off-by: Stuart Stephen [email protected]
mrswadge added a commit to mrswadge/chef_client_updater that referenced this pull request Jul 24, 2023
The directory name is incorrect when upgrading CINC. This change fixes the path.

This change is coupled with chef/mixlib-install#389.

Signed-off-by: Stuart Stephen <[email protected]>
@tpowell-progress tpowell-progress self-assigned this Jul 25, 2023
@tpowell-progress
Copy link
Contributor

Pending successful build run.

@sonarcloud
Copy link

sonarcloud bot commented Jul 27, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ramereth
Copy link
Contributor

ramereth commented Jul 27, 2023

This isn't needed as we maintain our own gem for this. You can use the following chef_client_updater resource like the following:

chef_client_updater "cinc-client" do
  product_name 'cinc'
  rubygems_url 'https://packagecloud.io/cinc-project/stable'
end

@mrswadge
Copy link
Author

This isn't needed as we maintain our own gem for this. You can use the following chef_client_updater resource like the following:

chef_client_updater "cinc-client" do
  product_name 'cinc'
  rubygems_url 'https://packagecloud.io/cinc-project/stable'
end

This doesn't work because of chef-cookbooks/chef_client_updater#249 which is why the product needs to be added.

@ramereth
Copy link
Contributor

ramereth commented Jul 27, 2023

@mrswadge that is failing due to the fact that you have the upstream mixlib-install gem already installed. You need to remove that gem and then do what I describe above. That will install the gem from our repo with our matrix included.

@mrswadge
Copy link
Author

@mrswadge that is failing due to the fact that you have the upstream mixlib-install gem already installed. You need to remove that gem and then do what I describe above. That will install the gem from our repo with our matrix included.

Does your gem also fix the issue I encountered in chef_client_updater too?

chef-cookbooks/chef_client_updater#252

@ramereth
Copy link
Contributor

@mrswadge it should since that constant is included in Cinc Client. Keep in mind if you're migrating from Chef to Cinc using this resource, you likely will be running into this issue. However if you're using that resource with Cinc Client, it should work fine.

@mrswadge
Copy link
Author

@mrswadge it should since that constant is included in Cinc Client. Keep in mind if you're migrating from Chef to Cinc using this resource, you likely will be running into this issue. However if you're using that resource with Cinc Client, it should work fine.

We're upgrading from Windows Cinc 15.6.10 to 18.2.7 and ran into the issue.

@ramereth
Copy link
Contributor

@mrswadge I seem to recall there possibly being some issues with those constants not being present in 15.6 so that would make sense. You may need to do a manual migration unfortunately.

@tpowell-progress
Copy link
Contributor

After discussing with @ramereth, we have opted to close this PR

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

Successfully merging this pull request may close these issues.

3 participants