Skip to main content

Posts

RHN Satellite Troubleshooting - Configuration File Deployment fails

This is an extremely ambiguous situation... but it happens to me frequently enough that I will document it. Take the following scenario... /home - directory /althome - symlink back to /home I will build a new system.  Unfortunately I login as myself for the first time (before I bootstrap, etc...).  I use "enablemkhomedir" and my home directory is listed as /althome/jradtke - so, when I login, it creates 2 directories: /althome & /althome/jradtke When I go to subscribe my system to Satellite and have it autodeploy the config files, it will fail [Mon Jan 21 19:57:06 2013] up2date Traceback (most recent call last):   File "/usr/sbin/rhn_check", line 332, in __run_action     (status, message, data) = CheckCli.__do_call(method, params, kwargs)   File "/usr/sbin/rhn_check", line 325, in __do_call     retval = method(*params, **kwargs)   File "/usr/share/rhn/actions/configfiles.py", line 222, in deploy     de...

Cron Errors

Not sure how to file this particular issue, as it probably is not very common. Summary:  if you see "Unable to change UID to" or "Unable to change GID to"  in your syslog, you should go review the file ownership and file name of your cron files. Sep 13 10:25:02 c ypher crond[32723]: pam_keyinit(crond:session): Unable to change GID to 1063 temporarily Sep 13 10:25:02 cypher crond[32723]: pam_keyinit(crond:session): Unable to change UID to 60064 temporarily  My specific issue happe ned because a username was changed which had the UID of 600 64. Previously  jradtke:x: 60064 :1 063 :J ames Radtke :/home/ jradtke :/bin/bash  [jradtke@cyper Kickstart]$ sudo ls -l /var/spool/cron/ | grep jrad -rw-------. 1 jradtke jradtke 25 Sep 13 11:57 jradtke N ow.. my username had been changed to jradtke@c o rp.company.com jradtke@c o rp.company.com :x: 60064 :1 063 :J ames Radtke :/home/ jradtke :/bin/bash To remedy th e issue: mv /var/spool/cron /jradtke /v...

Regex foo - checking crashkernel value

I need to check the crashkernel setting on all of my hosts. The issue(s): crashkernel=<blah> can exist anywhere in the string  there may be several iterations of a boot entry which contains crashkernel In this example, I purposely used a grub.conf which had 2 different crashkernel values to demonstrate how to change the enumeration of the test (either 1 or 2). [root@rhvsrv01 ~]# egrep '^[[:space:]]*kernel /vmlinuz.*crashkernel=' /boot/grub/grub.conf | sed -r '1!d;s/.*crashkernel=([[:graph:]]+).*/\1/' auto   [root@rhvsrv01 ~]# egrep '^[[:space:]]*kernel /vmlinuz.*crashkernel=' /boot/grub/grub.conf | sed -r '2!d;s/.*crashkernel=([[:graph:]]+).*/\1/' 16M@128M [root@rhvsrv01 ~]# grep vmlinuz /boot/grub/grub.conf | grep -v \#     kernel /vmlinuz-2.6.32-358.2.1.el6.x86_64 ro root=/dev/mapper/VolGroup00-LogVol01 rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup00/LogVol01 rd_LVM_LV=VolGroup00...

Staring at the Sun... what process is using a port

I found a nifty script out there that would pound through the /proc files and figure out what process(es) had a particular port without the use of lsof. I, unfortunately, do not know who to credit for this piece of work but I will gladly update this if someone knows the creator. #!/bin/ksh line='---------------------------------------------' pids=$(/usr/bin/ps -ef | sed 1d | awk '{print $2}') if [ $# -eq 0 ]; then    read ans?"Enter port you would like to know pid for: " else    ans=$1 fi for f in $pids do    /usr/proc/bin/pfiles $f 2>/dev/null | /usr/xpg4/bin/grep -q "port: $ans"    if [ $? -eq 0 ]; then       echo $line       echo "Port: $ans is being used by PID:\c"       /usr/bin/ps -ef -o pid -o args | egrep -v "grep|pfiles" | grep $f    fi done exit 0

VMware Workstation 9 and Fedora 19

I still find numerous things quirky with VMware Workstation on Fedora. Issue 1:  Workstation does not run You will likely see something like the following in the modconfig output: $ cat /tmp/vmware-jradtke/vmware-modconfig-15048.log ... /lib/modules/3.10.4-300.fc19.x86_64/build/include/linux/version.h .... So -- do the following (works on 2013-08-09) cd /var/tmp curl -O http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmblock-9.0.2-5.0.2-3.10.patch curl -O http://pkgbuild.com/git/aur-mirror.git/plain/vmware-patch/vmnet-9.0.2-5.0.2-3.10.patch cd /usr/lib/vmware/modules/source tar -xvf vmblock.tar tar -xvf vmnet.tar patch -p0 -i /var/tmp/vmblock-9.0.2-5.0.2-3.10.patch patch -p0 -i /var/tmp/vmnet-9.0.2-5.0.2-3.10.patch tar -cf vmblock.tar vmblock-only tar -cf vmnet.tar vmnet-only rm -r vmblock-only rm -r vmnet-only vmware-modconfig --console --install-all Issue 2:  You cannot apply the license via the GUI Run the following command: /usr/lib/v...

RHN Satellite Server (spacewalk) repomd.xml not found

"repomd.xml not found" If you add a channel, or if your RHN cache gets corrupted, and one of your guests complains that it cannot find repomd.xml for jb-ews-2-x86_64-server-5-rpm (for example) - you need to rebuild your repodata cache. Normally this is an automated job - which is exemplified by the fact that you have obviously built out your entire Satellite environment and never had to do any of the steps you are about to do. So - some prep work: Open 3 terminals to your Satellite Server and run: # Term 1 cd /var/cache/rhn watch "ls -l | wc -l" # Term 2 pwd cd /var/log/rhn tail -f rhn_taskomatic_daemon.log # Term 3 satellite-sync --channel=jb-ews-2-x86_64-server-5-rpm Once the satellite-sync has completed, you >should< see the count increment by one.  If you are unlucky (like me) you will not. You then need to login to the Satellite WebUI as the satellite admin user. Click on the Admin tab (at the top) Task Schedules (on the left) fin...

Kickstart RHEL 6 using Mirrored Disks (software RAID)

I have a host at home with 2 x 1TB SATA disks.  I don't necessarily need the redundancy on this box, but I thought since I was bothering to get my PXE and kickstart working at home I may as well figure this out as well... -- excerpt from kicksart profile -- # Clear the Master Boot Record zerombr # Remove ALL partitions clearpart --all --initlabel --drives=sda,sdb # Install the bootloader in the MBR bootloader --location=mbr --driveorder=sda,sdb part /boot/efi --fstype=efi --size=500 --ondisk=sda part /boot/efi-dummy --fstype=ext4 --size=500 --ondisk=sdb # You cannot define a specific partition ('onpart') if you use 'clearpart' part raid.sda2 --asprimary --fstype="raid" --ondisk=sda --size=512 part raid.sdb2 --asprimary --fstype="raid" --ondisk=sdb --size=512 part raid.sda3 --asprimary --fstype="raid" --ondisk=sda --size=51200 --grow part raid.sdb3 --asprimary --fstype="raid" --ondisk=sdb --size=51200 --grow...