Bug 706484 - ami-4efcca3a 2011-05-20 14:00
Summary: ami-4efcca3a 2011-05-20 14:00
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Cloud Image Validation
Classification: Red Hat
Component: images
Version: 1.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jay Greguske
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-20 18:02 UTC by releng-rhel@redhat.com
Modified: 2011-10-11 20:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-11 20:56:22 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description releng-rhel@redhat.com 2011-05-20 18:02:06 UTC
initial bug opening

Comment 1 releng-rhel@redhat.com 2011-05-20 18:02:14 UTC
IMAGE ID= ami-4efcca3a
/root/valid/src
ip-10-229-126-192
######################################################################################
# NEW TEST: The selected image has the version RHEL 6.1
######################################################################################
######################################################################################
# NEW TEST: ## Verify kernel name ... 
######################################################################################
COMMAND:  /bin/uname -s
RESULT: Linux 
EXPECTED RESULT: Linux
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify latest installed kernel is running ... 
######################################################################################
RHEL VERSION IS 6
LATEST_RPM_KERNEL_VERSION=2.6.32-131.0.15
CURRENT_UNAME_KERNAL_VERSION=2.6.32-131.0.15.el6
assert latest rpm kernel = uname -r
COMMAND:  uname -r | sed 's/\(.*\).........../\1/'
RESULT: 2.6.32-131.0.15 
EXPECTED RESULT: 2.6.32-131.0.15
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify latest kenerl is in /boot/grub/menu.1st ... 
######################################################################################
COMMAND:  cat /boot/grub/menu.lst | grep 2.6.32-131.0.15
RESULT: title RHEL6.1-20110510.1-Server-x86_64-starter-ec2 (2.6.32-131.0.15.el6.x86_64)
        kernel /boot/vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=LABEL=_/ 
        initrd /boot/initramfs-2.6.32-131.0.15.el6.x86_64.img 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify operating system ... 
######################################################################################
COMMAND:  /bin/uname -o
RESULT: GNU/Linux 
EXPECTED RESULT: GNU/Linux
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel ... 
######################################################################################
COMMAND:  ls /etc/sysconfig/kernel
RESULT: /etc/sysconfig/kernel 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel contains UPDATEDEFAULT ... 
######################################################################################
COMMAND:  cat /etc/sysconfig/kernel | grep UPDATEDEFAULT=yes
RESULT: UPDATEDEFAULT=yes 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel contains DEFAULTKERNEL ... 
######################################################################################
COMMAND:  cat /etc/sysconfig/kernel | grep DEFAULTKERNEL=kernel
RESULT: DEFAULTKERNEL=kernel 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Partition Format  ...
######################################################################################
mount | grep /dev/xvde | awk '{ print  }'
COMMAND:  echo ext4
RESULT: ext4 
EXPECTED RESULT: ext4
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Partition Size ...
######################################################################################
size=5905712
COMMAND:  echo true
RESULT: true 
EXPECTED RESULT: true
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## /sbin/getenforce ... 
######################################################################################
COMMAND:  /usr/sbin/getenforce
RESULT: Enforcing 
EXPECTED RESULT: Enforcing
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify SELINUX enforcing ... 
######################################################################################
COMMAND:  grep ^SELINUX= /etc/sysconfig/selinux | cut -d\= -f2
RESULT: enforcing 
EXPECTED RESULT: enforcing
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify SELINUXTYPE targeted ... 
######################################################################################
COMMAND:  grep ^SELINUXTYPE= /etc/sysconfig/selinux | cut -d\= -f2
RESULT: targeted 
EXPECTED RESULT: targeted
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Flip Selinux Permissive ... 
######################################################################################
COMMAND:  /usr/sbin/setenforce Permissive && /usr/sbin/getenforce
RESULT: Permissive 
EXPECTED RESULT: Permissive
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Flip Selinux Enforcing ... 
######################################################################################
COMMAND:  /usr/sbin/setenforce Enforcing && /usr/sbin/getenforce
RESULT: Enforcing 
EXPECTED RESULT: Enforcing
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify no missing packages ... 
######################################################################################
COMMAND: /bin/rpm -qa --queryformat='%{NAME}\n' > /tmp/rpmqa.tmp
RETURN CODE: 0
COMMAND: comm -23 packages_61 /tmp/rpmqa
RETURN CODE: 0
COMMAND:  cat /tmp/package_diff | wc -l
RESULT: 0 
EXPECTED RESULT: 0
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify RPMs ... 
######################################################################################
....L....  c /etc/pam.d/fingerprint-auth
....L....  c /etc/pam.d/password-auth
....L....  c /etc/pam.d/smartcard-auth
....L....  c /etc/pam.d/system-auth
    S file Size differs
    M Mode differs (includes permissions and file type)
    5 MD5 sum differs
    D Device major/minor number mismatch
    L readLink(2) path mismatch
    U User ownership differs
    G Group ownership differs
    T mTime differs

COMMAND:  cat /tmp/rpmqaV.txt | wc -l
RESULT: 4 
EXPECTED RESULT: 4
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify Version 2 ... 
######################################################################################
COMMAND:  /bin/rpm -q --queryformat '%{RELEASE}\n' redhat-release-server | cut -d. -f1,2
RESULT: 6.1 
EXPECTED RESULT: 6.1
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify packager ... 
######################################################################################
COMMAND:  cat /tmp/Packager | grep -v 'Red Hat, Inc.' |  grep -v crash-trace-commandPackager| wc -l
RESULT: 0 
EXPECTED RESULT: 0
RETURN CODE: 0
PASS
crash-trace-commandPackager    : Lai Jiangshan <laijs.com>
######################################################################################
# NEW TEST: ## Verify GPG checking ... 
######################################################################################
COMMAND:  grep '^gpgcheck=1' /etc/yum.repos.d/redhat-*.repo | cut -d\= -f2 | sort -f | uniq
RESULT: 1 
EXPECTED RESULT: 1
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify GPG Keys ... 
######################################################################################
COMMAND:  rpm -qa gpg-pubkey* | wc -l 
RESULT: 2 
EXPECTED RESULT: 2
RETURN CODE: 0
PASS
COMMAND:  rpm -qa gpg-pubkey* | sort -f | tail -n 1
RESULT: gpg-pubkey-fd431d51-4ae0493b 
EXPECTED RESULT: gpg-pubkey-fd431d51-4ae0493b
RETURN CODE: 0
PASS
COMMAND:  rpm -qa gpg-pubkey* | sort -f | head -n 1
RESULT: gpg-pubkey-2fa658e0-45700c69 
EXPECTED RESULT: gpg-pubkey-2fa658e0-45700c69
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify disabled yum plugin ... 
######################################################################################
COMMAND:  grep ^enabled /etc/yum/pluginconf.d/rhnplugin.conf | grep -v '^#' | cut -d\= -f2 | awk '{print }' | sort -f | uniq
RESULT:  0 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## install zsh ... 
######################################################################################
COMMAND: /usr/bin/yum -y install zsh
Installed products updated.
RETURN CODE: 0
COMMAND:  /bin/rpm -q --queryformat '%{NAME}\n' zsh
RESULT: zsh 
EXPECTED RESULT: zsh
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify package removal ... 
######################################################################################
COMMAND: /bin/rpm -e zsh
RETURN CODE: 0
COMMAND:  /bin/rpm -q zsh
RESULT: package zsh is not installed 
EXPECTED RESULT: package zsh is not installed
RETURN CODE: 1
PASS
######################################################################################
# NEW TEST: ## Verify yum update ... 
######################################################################################
COMMAND:  /usr/bin/yum -y update
Warning: RPMDB altered outside of yum.
Installed products updated.
RESULT: Loaded plugins: amazon-id, product-id, subscription-manager
Updating Red Hat repositories.
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package libgcrypt.x86_64 0:1.4.5-5.el6 will be updated
---> Package libgcrypt.x86_64 0:1.4.5-5.el6_1.1 will be an update
---> Package python-rhsm.noarch 0:0.95.6-1.el6 will be updated
---> Package python-rhsm.noarch 0:0.95.14-1.el6_1 will be an update
---> Package subscription-manager.x86_64 0:0.95.11-1.el6 will be updated
---> Package subscription-manager.x86_64 0:0.95.14-1.el6_1 will be an update
---> Package yum-rhn-plugin.noarch 0:0.9.1-26.el6 will be updated
---> Package yum-rhn-plugin.noarch 0:0.9.1-26.el6_1.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package         Arch   Version          Repository                        Size
================================================================================
Updating:
 libgcrypt       x86_64 1.4.5-5.el6_1.1  rhui-eu-west-rhel-server-updates 228 k
 python-rhsm     noarch 0.95.14-1.el6_1  rhui-eu-west-rhel-server-updates  33 k
 subscription-manager
                 x86_64 0.95.14-1.el6_1  rhui-eu-west-rhel-server-updates 292 k
 yum-rhn-plugin  noarch 0.9.1-26.el6_1.1 rhui-eu-west-rhel-server-updates  76 k

Transaction Summary
================================================================================
Upgrade       4 Package(s)

Total download size: 629 k
Downloading Packages:
--------------------------------------------------------------------------------
Total                                           1.4 MB/s | 629 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction

  Updating   : python-rhsm-0.95.14-1.el6_1.noarch                           1/8 

  Updating   : subscription-manager-0.95.14-1.el6_1.x86_64                  2/8 

  Updating   : libgcrypt-1.4.5-5.el6_1.1.x86_64                             3/8 

  Updating   : yum-rhn-plugin-0.9.1-26.el6_1.1.noarch                       4/8 

  Cleanup    : subscription-manager-0.95.11-1.el6.x86_64                    5/8

Comment 2 releng-rhel@redhat.com 2011-05-20 18:02:19 UTC
  Cleanup    : python-rhsm-0.95.6-1.el6.noarch                              6/8 

  Cleanup    : yum-rhn-plugin-0.9.1-26.el6.noarch                           7/8 

  Cleanup    : libgcrypt-1.4.5-5.el6.x86_64                                 8/8 
duration: 157(ms)

Updated:
  libgcrypt.x86_64 0:1.4.5-5.el6_1.1                                            
  python-rhsm.noarch 0:0.95.14-1.el6_1                                          
  subscription-manager.x86_64 0:0.95.14-1.el6_1                                 
  yum-rhn-plugin.noarch 0:0.9.1-26.el6_1.1                                      

Complete! 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify bash_history ... 
######################################################################################
COMMAND:  cat ~/.bash_history | wc -l 
cat: /root/.bash_history: No such file or directory
RESULT: 0 
EXPECTED RESULT: 0
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify no systemid file ... 
######################################################################################
COMMAND:  echo true
RESULT: true 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify rh-cloud-firstboot is on ... 
######################################################################################
COMMAND:  chkconfig --list | grep rh-cloud | grep 3:off | wc -l
RESULT: 1 
EXPECTED RESULT: 1
RETURN CODE: 0
PASS
/etc/sysconfig/rh-cloud-firstboot FOUND
COMMAND:  echo true
RESULT: true 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
COMMAND:  cat /etc/sysconfig/rh-cloud-firstboot
RESULT: RUN_FIRSTBOOT=NO 
EXPECTED RESULT: RUN_FIRSTBOOT=NO
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify nameserver ... 
######################################################################################
COMMAND:  /usr/bin/dig clock.redhat.com 2>> /root/valid/src/validate.log | grep 66.187.233.4  | wc -l
RESULT: 1 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify group file ... 
######################################################################################
COMMAND:  cat /etc/group | grep root:x:0
RESULT: root:x:0:root 
EXPECTED RESULT: root:x:0:root
RETURN CODE: 0
PASS
COMMAND:  cat /etc/group | grep bin:x:1
RESULT: bin:x:1:root,bin,daemon 
EXPECTED RESULT: bin:x:1:root,bin,daemon
RETURN CODE: 0
PASS
COMMAND:  cat /etc/group | grep daemon:x:2
RESULT: daemon:x:2:root,bin,daemon 
EXPECTED RESULT: daemon:x:2:root,bin,daemon
RETURN CODE: 0
PASS
COMMAND:  cat /etc/group | grep nobody:x:99
RESULT: nobody:x:99: 
EXPECTED RESULT: nobody:x:99:
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify new passwd file ... 
######################################################################################
COMMAND:  cat /etc/passwd | grep root:x:0
RESULT: root:x:0:0:root:/root:/bin/bash 
EXPECTED RESULT: root:x:0:0:root:/root:/bin/bash
RETURN CODE: 0
PASS
COMMAND:  cat /etc/passwd | grep nobody:x:99
RESULT: nobody:x:99:99:Nobody:/:/sbin/nologin 
EXPECTED RESULT: nobody:x:99:99:Nobody:/:/sbin/nologin
RETURN CODE: 0
PASS
COMMAND:  cat /etc/passwd | grep sshd
RESULT: sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin 
EXPECTED RESULT: sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify runlevel ... 
######################################################################################
COMMAND:  cat /etc/inittab | grep id:
RESULT: id:3:initdefault: 
EXPECTED RESULT: id:3:initdefault:
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify new shells file ... 
######################################################################################
COMMAND:  cat /etc/shells | grep bash
RESULT: /bin/bash 
EXPECTED RESULT: /bin/bash
RETURN CODE: 0
PASS
COMMAND:  cat /etc/shells | grep nologin
RESULT: /sbin/nologin 
EXPECTED RESULT: /sbin/nologin
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify IPv6 disabled ... 
######################################################################################
COMMAND:  grep ^NETWORKING_IPV6= /etc/sysconfig/network | cut -d\= -f2
RESULT: no 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify networking ... 
######################################################################################
COMMAND:  grep ^NETWORKING= /etc/sysconfig/network | cut -d\= -f2
RESULT: yes 
EXPECTED RESULT: yes
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify device ... 
######################################################################################
COMMAND:  grep ^DEVICE= /etc/sysconfig/network-scripts/ifcfg-eth0 | cut -d\= -f2
RESULT: eth0 
EXPECTED RESULT: eth0
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify iptables ... 
######################################################################################
COMMAND: /etc/init.d/iptables status | grep REJECT 
5    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
RETURN CODE: 0
COMMAND:  /etc/init.d/iptables status | grep :22 | grep ACCEPT | wc -l 
RESULT: 1 
EXPECTED RESULT: 1
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify sshd ...
######################################################################################
COMMAND:  chkconfig --list | grep sshd
RESULT: sshd           	0:off	1:off	2:on	3:on	4:on	5:on	6:off 
EXPECTED RESULT: sshd           	0:off	1:off	2:on	3:on	4:on	5:on	6:off
RETURN CODE: 0
PASS
COMMAND:  /etc/init.d/sshd status | grep running | wc -l
RESULT: 1 
EXPECTED RESULT: 1
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify  chkconfig ... 
######################################################################################
COMMAND:  chkconfig --list | grep crond | cut -f 5
RESULT: 3:on 
EXPECTED RESULT: 3:on
RETURN CODE: 0
PASS
COMMAND:  chkconfig --list | grep  iptables | cut -f 5
RESULT: 3:on 
EXPECTED RESULT: 3:on
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify rsyslog is on ... 
######################################################################################
COMMAND:  chkconfig --list | grep rsyslog | cut -f 5
RESULT: 3:on 
EXPECTED RESULT: 3:on
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify rsyslog config ... 
######################################################################################
COMMAND:  md5sum /etc/rsyslog.conf | cut -f 1 -d  " "
RESULT: dd356958ca9c4e779f7fac13dde3c1b5 
EXPECTED RESULT: dd356958ca9c4e779f7fac13dde3c1b5
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify auditd is on ... 
######################################################################################
COMMAND:  /sbin/chkconfig --list auditd | grep 3:on
RESULT: auditd         	0:off	1:off	2:on	3:on	4:on	5:on	6:off 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
COMMAND:  /sbin/chkconfig --list auditd | grep 5:on
RESULT: auditd         	0:off	1:off	2:on	3:on	4:on	5:on	6:off 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify audit.rules ... 
######################################################################################
COMMAND:  md5sum /etc/audit/audit.rules | cut -f 1 -d  " "
RESULT: f9869e1191838c461f5b9051c78a638d 
EXPECTED RESULT: f9869e1191838c461f5b9051c78a638d
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify auditd.conf ... 
######################################################################################
COMMAND:  md5sum /etc/audit/auditd.conf | cut -f 1 -d  " "
RESULT: 612ddf28c3916530d47ef56a1b1ed1ed 
EXPECTED RESULT: 612ddf28c3916530d47ef56a1b1ed1ed
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify auditd sysconfig ... 
######################################################################################
COMMAND:  md5sum /etc/sysconfig/auditd | cut -f 1 -d  " "
RESULT: 123beb3a97a32d96eba4f11509e39da2 
EXPECTED RESULT: 123beb3a97a32d96eba4f11509e39da2
RETURN CODE: 0
PASS

## Summary ##
FAILURES = 0
LOG FILE = /root/valid/src/validate.log
## Summary ##

######### /etc/rc.local ########
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
if [ ! -d /root/.ssh ] ; then
    mkdir -p /root/.ssh
    chmod 0700 /root/.ssh
    restorecon /root/.ssh
fi

ATTEMPTS=5
FAILED=0
# Fetch public key using HTTP
while [ ! -f /root/.ssh/authorized_keys ]; do
    curl -f http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /tmp/aws-key 2>/dev/null
    if [ $? -eq 0 ]; then
        cat /tmp/aws-key >> /root/.ssh/authorized_keys
        chmod 0600 /root/.ssh/authorized_keys
        restorecon /root/.ssh/authorized_keys
        rm -f /tmp/aws-key
        echo "Successfully retrieved AWS public key from instance metadata"
    else
        FAILED=$(($FAILED + 1))
        if [ $FAILED -ge $ATTEMPTS ]; then
            echo "Failed to retrieve AWS public key after $FAILED attempts, quitting"
            break
        fi
        echo "Could not retrieve AWS public key (attempt #$FAILED/$ATTEMPTS), retrying in 5 seconds..."
        sleep 5
    fi
done
######### /etc/rc.local ########
######################################################################################
# NEW TEST: ## Open a bugzilla
######################################################################################

Comment 3 releng-rhel@redhat.com 2011-05-20 18:03:13 UTC
IMAGE ID= asdf
###### TEST KERNEL AFTER REBOOT ####  
######################################################################################
# NEW TEST: ## Verify disabled yum plugin ... 
######################################################################################
COMMAND:  grep ^enabled /etc/yum/pluginconf.d/rhnplugin.conf | grep -v '^#' | cut -d\= -f2 | awk '{print }' | sort -f | uniq
RESULT:  0 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify kernel name ... 
######################################################################################
COMMAND:  /bin/uname -s
RESULT: Linux 
EXPECTED RESULT: Linux
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify latest installed kernel is running ... 
######################################################################################
RHEL VERSION IS 6
LATEST_RPM_KERNEL_VERSION=2.6.32-131.0.15
CURRENT_UNAME_KERNAL_VERSION=2.6.32-131.0.15.el6
assert latest rpm kernel = uname -r
COMMAND:  uname -r | sed 's/\(.*\).........../\1/'
RESULT: 2.6.32-131.0.15 
EXPECTED RESULT: 2.6.32-131.0.15
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify latest kenerl is in /boot/grub/menu.1st ... 
######################################################################################
COMMAND:  cat /boot/grub/menu.lst | grep 2.6.32-131.0.15
RESULT: title RHEL6.1-20110510.1-Server-x86_64-starter-ec2 (2.6.32-131.0.15.el6.x86_64)
        kernel /boot/vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=LABEL=_/ 
        initrd /boot/initramfs-2.6.32-131.0.15.el6.x86_64.img 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify operating system ... 
######################################################################################
COMMAND:  /bin/uname -o
RESULT: GNU/Linux 
EXPECTED RESULT: GNU/Linux
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel ... 
######################################################################################
COMMAND:  ls /etc/sysconfig/kernel
RESULT: /etc/sysconfig/kernel 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel contains UPDATEDEFAULT ... 
######################################################################################
COMMAND:  cat /etc/sysconfig/kernel | grep UPDATEDEFAULT=yes
RESULT: UPDATEDEFAULT=yes

Comment 4 releng-rhel@redhat.com 2011-05-20 18:03:17 UTC
RETURN CODE: 0
PASS
######################################################################################
# NEW TEST: ## Verify /etc/sysconfig/kernel contains DEFAULTKERNEL ... 
######################################################################################
COMMAND:  cat /etc/sysconfig/kernel | grep DEFAULTKERNEL=kernel
RESULT: DEFAULTKERNEL=kernel 
EXPECTED RESULT: 
RETURN CODE: 0
PASS
hostname
######################################################################################
# NEW TEST: The selected image has the version RHEL 6.1
######################################################################################

## Summary ##
FAILURES = 0
LOG FILE = /root/valid/src/validate.log
## Summary ##

######### /etc/rc.local ########
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
if [ ! -d /root/.ssh ] ; then
    mkdir -p /root/.ssh
    chmod 0700 /root/.ssh
    restorecon /root/.ssh
fi

ATTEMPTS=5
FAILED=0
# Fetch public key using HTTP
while [ ! -f /root/.ssh/authorized_keys ]; do
    curl -f http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key > /tmp/aws-key 2>/dev/null
    if [ $? -eq 0 ]; then
        cat /tmp/aws-key >> /root/.ssh/authorized_keys
        chmod 0600 /root/.ssh/authorized_keys
        restorecon /root/.ssh/authorized_keys
        rm -f /tmp/aws-key
        echo "Successfully retrieved AWS public key from instance metadata"
    else
        FAILED=$(($FAILED + 1))
        if [ $FAILED -ge $ATTEMPTS ]; then
            echo "Failed to retrieve AWS public key after $FAILED attempts, quitting"
            break
        fi
        echo "Could not retrieve AWS public key (attempt #$FAILED/$ATTEMPTS), retrying in 5 seconds..."
        sleep 5
    fi
done
cd /root/valid/src
./image_validation_postreboot.sh --imageID=asdf --RHEL=6.1 --full-yum-suite=no --skip-questions=yes --bugzilla-username=releng-rhel --bugzilla-password=4fd731838ea91c20 --bugzilla-num=706484  --failures=0 >> /var/log/messages
######### /etc/rc.local ########
######################################################################################
# NEW TEST: ## Open a bugzilla
######################################################################################

Comment 5 Jay Greguske 2011-10-11 20:56:22 UTC
Closing out old AMI validation reports.


Note You need to log in before you can comment on or make changes to this bug.