Bug 626737 - Include support for Satellite 5.4.0 Maintenance Window / Staged Deployment feature
Summary: Include support for Satellite 5.4.0 Maintenance Window / Staged Deployment fe...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Miroslav Suchý
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks: 625778
TreeView+ depends on / blocked
 
Reported: 2010-08-24 09:10 UTC by Michael Mráka
Modified: 2018-11-14 16:25 UTC (History)
5 users (show)

Fixed In Version: yum-rhn-plugin-0.5.4-17 rhn-client-tools-0.4.20-45
Doc Type: Enhancement
Doc Text:
The rhn-client-tools package has been updated to support the Red Hat Network Satellite Server Maintenance Window.
Clone Of:
: 626739 (view as bug list)
Environment:
Last Closed: 2011-01-14 00:11:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0112 0 normal SHIPPED_LIVE yum-rhn-plugin and rhn-client-tools bug fix and enhancement update 2011-01-12 17:29:05 UTC

Description Michael Mráka 2010-08-24 09:10:13 UTC
Description of problem:
New Satellite 5.4.0 feature - Maintenance Window / Staged Deployment - needs support on the client side.
The feature is already in upstream Spacewalk 1.1.


Version-Release number of selected component (if applicable):
rhn-client-tools-1.1.13-1.

How reproducible:


Steps to Reproduce:
1. register
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 4 Miroslav Suchý 2010-10-29 20:31:43 UTC
changes cherrypicked from https://bugzilla.redhat.com/show_bug.cgi?id=626739#c9

applied to yum-rhn-plugin as rev. 197281

Comment 5 Miroslav Suchý 2010-10-29 20:38:32 UTC
applied to rhn-client-tools as rev. 197283

Comment 7 Miroslav Suchý 2010-11-04 15:56:35 UTC
forgot to cherrypick one commit:

svn commit -m '626737 - packages for update should be cached
>
> cherrypicked from spacewalk.git commit 95702f6afae9e791badd3bef48f34a5fb937ce4d'
Sending        yum-rhn-plugin/actions/packages.py
Transmitting file data .
Committed revision 197501.

Comment 8 Pavel Novotny 2010-11-16 10:55:33 UTC
Verified.

Procedure:

Server: Satellite 5.4
Client: RHEL5.6 (registered with base channel rhel-x86_64-server-5)

On client in /etc/sysconfig/rhn/up2date you have to have stagingContent=1, you can optionally specify stagingContentWindow=24, which will say look ahead of 24 hours.
On server Admin -> Organization -> choose one -> Configuration -> Enable staging content.

1. First thing you need to do on client is to disable all your yum repos in /etc/yum.repos.d/ (or move it somewhere else). This is necessary to ensure that installation of a package will use the software channel from Satellite, not some RHEL repository.
2. Register client into Satellite.
3. In Sat. WebUI schedule a package install for client in time now()+10mins (package 'adaptx' in our case).
4. Immediately after it run on client 'rhn_check -vv'. The output should look like this:
----------------------------------------
[root@cisco-b200m1-01 etc]# rhn_check -vv
D: do_call packages.checkNeedUpdate ('rhnsd=1',) {}
Loaded plugins: rhnplugin
D: login(forceUpdate=False) invoked
D: readCachedLogin invoked
D: Checking pickled loginInfo, currentTime= 1289903758.28 , createTime= 1289903037.48 , expire-offset= 3600.0
D: readCachedLogin(): using pickled loginInfo set to expire at  1289906637.48
D: local action status:  (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>adaptx</string></value>\n<value><string>0.9.13</string></value>\n<value><string>3jpp.1</string></value>\n<value><string>0</string></value>\n<value><string>x86_64</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 2318}
D: handle_action actionid = 2318, version = 2
D: do_call packages.update ([['adaptx', '0.9.13', '3jpp.1', '0', 'x86_64']],) {'cache_only': 1}
D: Called update [['adaptx', '0.9.13', '3jpp.1', '0', 'x86_64']]
D: Dependencies Resolved
D: Downloading Packages:
D: Just pre-caching packages, skipping package install
[root@cisco-b200m1-01 etc]# ll /var/cache/yum/rhel-x86_64-server-5/packages/
total 748
-rw-r--r-- 1 root root 754664 Mar  9  2007 adaptx-0.9.13-3jpp.1.x86_64.rpm
[root@cisco-b200m1-01 etc]# rpm -q adaptx
package adaptx is not installed
----------------------------------------
Notice the line "D: do_call packages.update ([['adaptx', '0.9.13', '3jpp.1', '0', 'x86_64']],) {'cache_only': 1}".
You see that package 'adaptx' was only downloaded into yum cache directory, but was not installed.

5. Wait till the specified scheduled time (which was now()+10mins) and run 'rhn_check -vv' again. Now it won't download the package again, instead it will install it from yum cache directly:
----------------------------------------
[root@cisco-b200m1-01 etc]# rhn_check -vv
D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>adaptx</string></value>\n<value><string>0.9.13</string></value>\n<value><string>3jpp.1</string></value>\n<value><string>0</string></value>\n<value><string>x86_64</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 2318}
updateLoginInfo() login info
D: login(forceUpdate=True) invoked
logging into up2date server
D: writeCachedLogin() invoked
D: Wrote pickled loginInfo at  1289904186.84  with expiration of  1289907786.84  seconds.
successfully retrieved authentication token from up2date server
D: logininfo: {'X-RHN-Server-Id': 1000010354, 'X-RHN-Auth-Server-Time': '1289902102.21', 'X-RHN-Auth': 'Se2bGgwWr5zAZjhRc/gTbw==', 'X-RHN-Auth-Channels': [['rhel-x86_64-server-5', '20101111120208', '1', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>adaptx</string></value>\n<value><string>0.9.13</string></value>\n<value><string>3jpp.1</string></value>\n<value><string>0</string></value>\n<value><string>x86_64</string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 2318}
D: handle_action actionid = 2318, version = 2
D: do_call packages.update ([['adaptx', '0.9.13', '3jpp.1', '0', 'x86_64']],) {'cache_only': None}
Loaded plugins: rhnplugin
D: Called update [['adaptx', '0.9.13', '3jpp.1', '0', 'x86_64']]
D: Dependencies Resolved
D: Downloading Packages:
D: Running Transaction Test
D: Finished Transaction Test
D: Transaction Test Succeeded
D: Running Transaction
Updating package profile
D: Sending back response (0, 'Update Succeeded', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',) {}
D: Called refresh_rpmlist
Updating package profile
D: local action status:  (0, 'rpmlist refreshed', {})
[root@cisco-b200m1-01 etc]# rpm -q adaptx
adaptx-0.9.13-3jpp.1
----------------------------------------

Comment 10 Jaromir Hradilek 2010-11-30 12:34:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The rhn-client-tools package has been updated to support the Red Hat Network Satellite Server Maintenance Window.

Comment 12 errata-xmlrpc 2011-01-14 00:11:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0112.html


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