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

Added fact for reporting PSP version #1

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

Added fact for reporting PSP version #1

wants to merge 1 commit into from

Conversation

replicant0wnz
Copy link

Not sure if ya need this or not, but I needed it in my environment at the request of some other engineers. Pushed it out and it reported on the 280 nodes we have deployed on HP hardware. Just ran this query after directly on the Puppet DB:

select hosts.name, fact_values.value
from hosts, fact_values
where fact_values.fact_name_id = (select id from fact_names where name = 'psp_version')
and hosts.id = fact_values.host_id
order by name

I've only tested on 7.x, 8.x, and 9.x. For 8.x and 9.x it should report the actual PSP version based on the hp-snmp-agents rpm, but for 7.x it can only get the x.x version instead of the x.x.x version based off the hpasm rpm.

@travisbot
Copy link

This pull request passes (merged 2a4657e into 760cfd5).

@ghost ghost assigned razorsedge Sep 3, 2012
@razorsedge
Copy link
Owner

Nice!

What happens when the PSP fact does not match up with the "releases" we see in the SDR?

$ ls ./PSP/{rhel,oracle,centos}/?/{i386,x86_64}/8.7*/hp-snmp-agents*
./PSP/centos/5/i386/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/centos/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/centos/5/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/centos/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/centos/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/centos/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/oracle/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/oracle/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/oracle/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/oracle/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/rhel/5/i386/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/rhel/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/rhel/5/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/rhel/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/rhel/6/i386/8.70/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/rhel/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/rhel/6/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/rhel/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm

@replicant0wnz
Copy link
Author

Shit,

We don't have a ton of 8.7 deployed but ya, you caught me .. After taking a
look at the DB I found this:

[root@xxx:psp]# pwd
/usr/src/psp
[root@xxx:psp]# ls psp-8.72.rhel6-patched.x86_64.tar.gz
psp-8.72.rhel6-patched.x86_64.tar.gz
[root@xxx:psp]# rpm -q hp-snmp-agents
hp-snmp-agents-8.7.0.23-17.x86_64

The "patched" package is the same package you get w/the HP website except
we modify the .xml to only install the agents and no drivers. We also leave
a copy of the install bits in the need of a re-install ..

It seems you have the same issue that I do, finding out what version of the
PSP is installed. I could retract my statement that anything 8+ and above
we can get the full x.x.x version, as it seems we can only get the x.x
version just like the 7 series :-/

You have any suggestions?

On Sun, Sep 2, 2012 at 8:28 PM, Mike Arnold notifications@github.comwrote:

Nice!

What happens when the PSP fact does not match up with the "releases" we
see in the SDR http://downloads.linux.hp.com/SDR/?

$ ls ./PSP/{rhel,oracle,centos}/?/{i386,x86_64}/8.7_/hp-snmp-agents_
./PSP/centos/5/i386/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/centos/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/centos/5/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/centos/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/centos/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/centos/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/oracle/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/oracle/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/oracle/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/oracle/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/rhel/5/i386/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/rhel/5/i386/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.i386.rpm
./PSP/rhel/5/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/rhel/5/x86_64/8.73/hp-snmp-agents-8.7.0.23-17.rhel5.x86_64.rpm
./PSP/rhel/6/i386/8.70/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/rhel/6/i386/8.72/hp-snmp-agents-8.7.0.23-16.rhel6.i386.rpm
./PSP/rhel/6/x86_64/8.70/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm
./PSP/rhel/6/x86_64/8.72/hp-snmp-agents-8.7.0.23-17.rhel6.x86_64.rpm


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-8228065.

I've seen things you people wouldn't believe. Attack ships on fire off
the shoulder of Orion. I watched C-beams glitter in the dark near the
Tannhauser gate. All those moments will be lost in time... like tears
in rain... Time to die.

@razorsedge
Copy link
Owner

Ah yes. I've done the modified XML/tarball thing before. :)

I'm thinking that the concept of a PSP bundle might be more geared toward the old "deploy from taball" method. In that case I would either use your RPM version = PSP version method or possibly even drop a file in /etc/facts.d (see the puppetlabs/stdlib module) during tarball install to match the PSP tarball version.

In the case of this psp module, where we control which yumrepo URL we point at (http://.../packages/ and not any particular version) and also whether or not to upgrade (autoupgrade => true), I am wondering if the PSP "version" even matters?

@replicant0wnz
Copy link
Author

We've always done it that way, I just noticed HP started putting up YUM
repo's for the PSP maybe like 6 months ago :-O

To be honest we really only install the PSP for monitoring purposes, failed
drive, PS, etc. I know some of our front line support guys use the SMH
sometimes, but I haven't a clue what for ;-) The reason I wrote the fact
was for our front line support folks, not sure why they needed the version.
The only specific reason I could think of that version would matter would
be if you called HP support on an issue.

Did they fold the facts.d module into the standard Puppet libs? I've seen
the module mentioned on the lists but never really looked at it ..

On Mon, Sep 3, 2012 at 1:43 PM, Mike Arnold notifications@github.comwrote:

Ah yes. I've done the modified XML/tarball thing before. :)

I'm thinking that the concept of a PSP bundle might be more geared toward
the old "deploy from taball" method. In that case I would either use your
RPM version = PSP version method or possibly even drop a file in
/etc/facts.d (see the puppetlabs/stdlib module) during tarball install to
match the PSP tarball version.

In the case of this psp module, where we control which yumrepo URL we
point at (http://.../packages/ and not any particular version) and also
whether or not to upgrade (autoupgrade => true), I am wondering if the PSP
"version" even matters?


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-8244749.

I've seen things you people wouldn't believe. Attack ships on fire off
the shoulder of Orion. I watched C-beams glitter in the dark near the
Tannhauser gate. All those moments will be lost in time... like tears
in rain... Time to die.

@razorsedge
Copy link
Owner

Yes, facts.d support is now in puppetlabs-stdlib. Stdlib has a bunch of useful functions for manifest writers and also a few new facts.

@replicant0wnz
Copy link
Author

Finally went through the lists this morning and tracked that down. :-/

On Wed, Sep 5, 2012 at 10:18 AM, Mike Arnold notifications@github.comwrote:

Yes, facts.d support is now in puppetlabs-stdlib. Stdlib has a bunch of
useful functions for manifest writers and also a few new facts.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1#issuecomment-8302419.

I've seen things you people wouldn't believe. Attack ships on fire off
the shoulder of Orion. I watched C-beams glitter in the dark near the
Tannhauser gate. All those moments will be lost in time... like tears
in rain... Time to die.

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