November 19

Linux: When yum update interruption breaks gnome

rpm -qa | grep yum
yum reinstall yum-utils-1.1.31-45.el7 – change to appropriate version number
package-cleanup –cleandupes
Once this is complete we shouldn’t see any more duplicates on the system.
package-cleanup –duped

Category: Linux | Comments Off on Linux: When yum update interruption breaks gnome
November 19

Linux: Red Hat Satellite puppet issues

If Satellite is not seeing a report from the server use the following command from the host to try and force a sync
puppet agent -tv


If you run into a lock issue where “puppet agent -tv” will not work, try the following:

systemctl stop puppet

rm /var/lib/puppet/state/agent_catalog_run.lock

systemctl start puppet

ps aux | grep puppet
root 26701 42.0 0.3 248764 41080 ? Ssl 10:14 0:01 /usr/bin/ruby /usr/bin/puppet agent –no-daemonize
root 26711 51.0 0.4 351092 56660 ? Sl 10:14 0:01 puppet agent: applying configuration

A couple of minutes later the “puppet agent: applying configuration” job completed. I was able to rerun “puppet agent -tv”.

Category: Linux | Comments Off on Linux: Red Hat Satellite puppet issues
November 18

Linux: Example Puppet Setup

Host:
yum install puppet -y

RHEL 7
echo “server = satelliteserver.yourdomain.com” >> /etc/puppet/puppet.conf;systemctl enable puppet ; systemctl start puppet

RHEL 6
echo “server = satelliteserver.yourdomain.com” >> /etc/puppet/puppet.conf;chkconfig puppet on ; service puppet start

Server:
puppet cert list

puppet cert sign -all


After you assign the host you can run “puppet agent -tv” to force a sync

Category: Linux | Comments Off on Linux: Example Puppet Setup
November 18

Linux: Red Hat Satellite with VMWARE

Refresh satellites knowledge of the vm servers on the ESXI hosts
systemctl stop virt-who
virt-who --one-shot 
systemctl start virt-who

Configuration of virt-who on the satellite server:
/etc/virt-who.d/one.conf

[one]
type=esx
hypervisor_id=hostname
server=vcenter.companyname.com
username=domainname\username
encrypted_password=5cd54deb8b1ebfb61fa04a9512bd97ed
owner=OrganizationalNameUsedInSatellite
env=Library
filter_hosts=esxidev.companyname.com,esxidev2.companyname.com,esxidev3.companyname.com,esxidev4.companyname.com,esxidev5.companyname.com,esxidev6.companyname.com,esxiprod1,esxiprod2.companyname.com,esxiprod3,esxiprod4.companyname.com,esxiprod5.companyname.com,esxiprod6.companyname.com,esxidev.companyname.com,esxidev1.companyname.com
rhsm_hostname=servername.companyname.com
rhsm_username=admin
rhsm_encrypted_password=456adc0cafa8ed065c021ce32bf64273
rhsm_prefix=/rhsm
Category: Linux | Comments Off on Linux: Red Hat Satellite with VMWARE
November 18

Linux: Red Hat Satellite job for updating and rebooting without a failed status

yum -y update ; shutdown -r +1 &

A “fail safe” option would be to run this from screen. This helps to protect system corruption in the event of a network drop.
screen -AmdS bash_shell bash ; screen -S bash_shell -p 0 -X stuff $’yum update -y\r’ ; screen -S bash_shell -p 0 -X stuff $’reboot\r’

The problem with this option is it always shows everything ran successfully.

Category: Linux | Comments Off on Linux: Red Hat Satellite job for updating and rebooting without a failed status