Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 855305 Details for
Bug 1056906
openshift.ks/openshift.sh: RHSM/RHN is all or nothing (registration, configuring pools and channels, validation, etc.)
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test script for RHN/RHSM configuration
test-repo-configuration.sh (text/x-shellscript), 3.69 KB, created by
Miciah Dashiel Butler Masters
on 2014-01-25 05:22:57 UTC
(
hide
)
Description:
Test script for RHN/RHSM configuration
Filename:
MIME Type:
Creator:
Miciah Dashiel Butler Masters
Created:
2014-01-25 05:22:57 UTC
Size:
3.69 KB
patch
obsolete
>#!/bin/bash > >poolid='[redacted]' >rhnuser='[redacted]@redhat.com' >rhnpass='[redacted]' >profile_name="OpenShift-`hostname`" > >runtest() >{ > export CONF_INSTALL_METHOD=$install_method > > if [[ $register_with_rhn = yes ]] > then > rhnreg_ks --force --profilename="$profile_name" \ > --username "$rhnuser" --password "$rhnpass" > fi > > if [[ $register_with_rhsm = yes ]] > then > subscription-manager register --force \ > --username="$rhnuser" --password="$rhnpass" \ > --name "$profile_name" > fi > > if [[ $add_channels = yes ]] > then > # Note that $add_channels is only meaningful if we are registered > # with RHN or RHSM. > > if [[ $register_with_rhn = yes ]] > then > for repo in 'rhel-x86_64-server-6-rhscl-1' \ > 'rhel-x86_64-server-6-ose-2.0-infrastructure' \ > 'rhel-x86_64-server-6-ose-2.0-node' \ > 'jb-ews-2-x86_64-server-6-rpm' \ > 'rhel-x86_64-server-6-ose-2.0-rhc' \ > 'rhel-x86_64-server-6-ose-2.0-jbosseap' \ > 'jbappplatform-6-x86_64-server-6-rpm' > do > rhn-channel --add --channel "$repo" \ > --user "$rhnuser" --password "$rhnpass" || exit > done > fi > > if [[ $register_with_rhsm = yes ]] > then > subscription-manager attach --pool "$poolid" > subscription-manager repos \ > --enable=rhel-6-server-ose-2.0-node-rpms \ > --enable=rhel-6-server-ose-2.0-infra-rpms \ > --enable=rhel-6-server-ose-2.0-rhc-rpms \ > --enable=rhel-server-rhscl-6-rpms > fi > fi > > if [[ $provide_credentials = yes ]] > then > export CONF_RHN_USER="$rhnuser" > export CONF_RHN_PASS="$rhnpass" > fi > > if [[ $provide_poolid = yes ]] > then > export CONF_SM_REG_POOL="$poolid" > fi > > testlog="test-${testn}-output.log" > : > "$testlog" > > echo 'Configuration:' >> "$testlog" > env | grep CONF_ >> "$testlog" > > echo 'Running openshift.sh:' >> "$testlog" > echo >> "$testlog" > sh openshift.sh actions=validate_preflight,configure_repos &>> "$testlog" > result=$? > > if [[ $result = 0 ]] && > grep -q '^OpenShift: Completed configuring repos.$' "$testlog" > then > # configure_repos ran to completion. > result='OK' > elif [[ $result != 0 ]] && > grep -q '^OpenShift: Completed preflight validation.$' "$testlog" > then > # We completed validate_preflight and something went > # wrong after that. > result='ERROR' > else > # validate_preflight must have caused openshift.sh to > # abort. > result='ABORT' > fi > > printf '%-8s%-8s%-12s%-12s%-10s%-13s%-10s%s\n' \ > "$testn" "$install_method" "$register_with_rhn" \ > "$register_with_rhsm" "$add_channels" "$provide_credentials" \ > "$provide_poolid" "$result" \ > >> test_results.log >} > >runtests() >{ > printf '%s\n%s\n%s\n' \ > 'test # method Registered Registered Channels Credentials Pool id Result' \ > ' with RHN with RHSM added provided provided'\ > '-------------------------------------------------------------------------------' \ > > test_results.log > > testn=1 > for install_method in rhn rhsm > do for register_with_rhn in no yes > do for register_with_rhsm in no yes > do for add_channels in no yes > do for provide_credentials in no yes > do for provide_poolid in no yes > do runtest $testn; cleanup; ((testn++)) > done; done; done; done; done; done; >} > > ># Clean up RHN and RHSM configuration so that we have a clean slate for ># the next test run. >cleanup() >{ > # Deregister from RHN. > rm -f /etc/sysconfig/rhn/systemid > > # Deregister from RHSM. > subscription-manager unregister > > unset CONF_RHN_USER > unset CONF_RHN_PASS > unset CONF_SM_REG_POOL > unset CONF_INSTALL_METHOD >} > >cleanup >runtests
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1056906
: 855305 |
855306
|
855307
|
855630
|
855631
|
855632
|
855633