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

Update solaris to add pkg publisher #658

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rstuart-indue
Copy link

The Solaris class only set up the repo, it didn't configure the pkg tool to use it. This adds the extra command to configure the "client" side of this to allow the pkg tool to see packages in the repo previously configured.

The Solaris class only set up the repo, it didn't configure the pkg tool to use it.
@rstuart-indue rstuart-indue requested a review from a team as a code owner July 13, 2023 01:59
Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

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

Thanks @rstuart-indue! What was the error you were seeing prior to this PR? I'm also wondering if this ever worked in certain circumstances?

@@ -107,6 +107,12 @@
logoutput => 'on_failure',
refreshonly => true,
}
~> exec { 'puppet_agent add publisher to pkg':
command => "pkg set-publisher -e -g ${pkgrepo_dir} ${publisher}",
Copy link
Contributor

Choose a reason for hiding this comment

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

If the publisher already exists (as described in https://tickets.puppetlabs.com/browse/PA-5215) will this command still work?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

@rstuart-indue rstuart-indue Sep 25, 2024

Choose a reason for hiding this comment

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

Sorry @joshcooper it looks like I missed the previous notifications.

I don't seem to be able to find the linked ticket above. The pkg man page says it will update or add. here is a system and executing this command when the publisher already exists:

[16:32:27] root@host
/root# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://172.20.98.16:8003/IPS/
puppetlabs.com              origin   online F file:///etc/puppetlabs/installer/solaris.repo/
[16:32:33] root@host
/root# pkg publisher puppetlabs.com
            Publisher: puppetlabs.com
                Alias:
           Origin URI: file:///etc/puppetlabs/installer/solaris.repo/
        Origin Status: Online
              SSL Key: None
             SSL Cert: None
          Client UUID: 6cfd453a-2141-11ee-9502-43f3b6da7299
      Catalog Updated: Thu Nov  9 03:44:37 2023
    Publisher enabled: Yes
[16:32:36] root@host
/root# pkg set-publisher -e -g /etc/puppetlabs/installer/solaris.repo/ puppetlabs.com
[16:32:44] root@host
/root# pkg publisher puppetlabs.com
            Publisher: puppetlabs.com
                Alias:
           Origin URI: file:///etc/puppetlabs/installer/solaris.repo/
        Origin Status: Online
              SSL Key: None
             SSL Cert: None
          Client UUID: 6cfd453a-2141-11ee-9502-43f3b6da7299
      Catalog Updated: Thu Nov  9 03:44:37 2023
    Publisher enabled: Yes
[16:32:51] root@host
/root# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F http://172.20.98.16:8003/IPS/
puppetlabs.com              origin   online F file:///etc/puppetlabs/installer/solaris.repo/

This additional code is to have Solaris 11 behave the same was as redhat and configure the repo as appropriate. ref https://github.com/puppetlabs/puppetlabs-puppet_agent/blob/main/manifests/osfamily/redhat.pp#L162 and this block mimics the yumrepo declaration of line 167.

Copy link
Author

Choose a reason for hiding this comment

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

Re your question of whether this ever worked: no, it didn't. This didn't set up the "client side" of the repo and enable it for use which seems to be the expectation of setting the "manage_repo" parameter.

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.

2 participants