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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions manifests/osfamily/solaris.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.

path => '/bin:/usr/bin:/sbin:/usr/sbin',
logoutput => 'on_failure',
refreshonly => true,
}
# Make sure the pkg publishers are all available. Broken
# publisher entries will stop the installation process.
# This must happen before removing any packages.
Expand Down