Bug 706467

Summary: ami-9af4c2ee 2011-05-20 13:14
Product: Cloud Image Validation Reporter: releng-rhel <releng-rhel>
Component: imagesAssignee: Jay Greguske <jgreguske>
Status: CLOSED CURRENTRELEASE QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: kbidarka, sghai
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-11 20:56:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Comment
none
Comment none

Description releng-rhel@redhat.com 2011-05-20 17:24:22 UTC
initial bug opening

Comment 1 releng-rhel@redhat.com 2011-05-20 17:24:30 UTC
Created attachment 915237 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 2 releng-rhel@redhat.com 2011-05-20 17:24:34 UTC
Created attachment 915238 [details]
Comment

(This comment was longer than 65,535 characters and has been moved to an attachment by Red Hat Bugzilla).

Comment 3 releng-rhel@redhat.com 2011-05-20 17:25:21 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 Red Hat Enterprise Linux Server (2.6.32-131.0.15.el6.x86_64)
        kernel /boot/vmlinuz-2.6.32-131.0.15.el6.x86_64 ro root=LABEL=_/ crashkernel=auto LANG=en_US.UTF-8 KEYTABLE=us
        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

Comment 4 releng-rhel@redhat.com 2011-05-20 17:25:26 UTC
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
hostname

## 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.0 --full-yum-suite=no --skip-questions=yes --bugzilla-username=releng-rhel --bugzilla-password=4fd731838ea91c20 --bugzilla-num=706467  --failures=0 >> /var/log/messages
######### /etc/rc.local ########
######################################################################################
# NEW TEST: ## Open a bugzilla
######################################################################################

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