Bug 487668 - RHN Solaris client freezes when installing a patch that has been previously unzipped to /tmp
Summary: RHN Solaris client freezes when installing a patch that has been previously u...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 0.5
Hardware: All
OS: Other
medium
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Jesus M. Rodriguez
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2009-02-27 11:31 UTC by Jan Pazdziora (Red Hat)
Modified: 2009-09-17 07:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of: 467349
Environment:
Last Closed: 2009-09-17 07:10:46 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2009-02-27 11:31:25 UTC
+++ This bug was initially created as a clone of Bug #467349 +++

Description of problem:

When installing a patch, the first step is to unzip the patch into /tmp. However if there already is an old version of the archive in /tmp unzip hangs waiting for user input.

# up2date --get somepatch 
# Unzip it in /tmp
# up2date somepatch
[Freeze]

Packages installed on the Solaris box:

utility     RHATpossl                    pyOpenSSL 0.6
utility     RHATpythn                    python 2.4.1
utility     RHATrcfg                     rhncfg 5.1.0
utility     RHATrcfga                    rhncfg-actions 5.1.0
utility     RHATrcfgc                    rhncfg-client 5.1.0
utility     RHATrcfgm                    rhncfg-management 5.1.0
utility     RHATrhnc                     rhnclient 5.1.0
utility     RHATrhnl                     rhnlib 1.8
utility     RHATsmart                    smartpm 5.1.1

The probably cause of the problem:

In line 63 of /opt/redhat/rhn/solaris/lib/python2.4/site-packages/smart/backends/solaris/pm.py
                cmdstr = "unzip %s -d %s" % (path, tdir)
Please update to read:
                cmdstr = "unzip %s -u -d %s" % (path, tdir)
Where -u does:
     -u   update existing files and create new  ones  if  needed.
          This  option  performs  the  same  function  as  the -f
          option, extracting (with query) files  that  are  newer
          than  those with the same name on disk, and in addition
          it extracts those files that do not  already  exist  on
          disk.   See  -f  above  for  information on setting the
          timezone properly.

Suggested fix:
make use of `mktemp -d` to create directories in /tmp

Comment 1 Jan Pazdziora (Red Hat) 2009-02-27 11:35:31 UTC
The -u option added, in Spacewalk repo, commit 8557bd24dab10f71ca6b4ff1eefbe40a4c52cb67.

Note that we cannot generally use mktemp because it's not available on SunOS 5.8.

Comment 2 Jan Pazdziora (Red Hat) 2009-02-27 13:03:29 UTC
I've ended up using tempfile.mkdtemp in python, commit 0d271589b6254304cf0eea60a56176f6eeaf7c5a.

Comment 3 Jan Pazdziora (Red Hat) 2009-04-01 06:36:25 UTC
With Spacewalk 0.5 released, moving ON_QA.

Comment 4 Jesus M. Rodriguez 2009-04-14 14:13:20 UTC
Spacewalk 0.5 released.

Comment 5 Miroslav Suchý 2009-09-17 07:10:46 UTC
Spacewalk 0.5 has been released for long time ago.


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