Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 524443 Details for
Bug 737697
RFE: rhn_check fails to deploy some files when the configuration channel have some other files which does not have a valid UID/GID
Home
New
Search
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.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch proposed
0001-737697-fixed-rhn_check-when-deploying-a-group-files-.patch (text/plain), 2.49 KB, created by
Marcelo Moreira de Mello
on 2011-09-22 16:05:50 UTC
(
hide
)
Description:
patch proposed
Filename:
MIME Type:
Creator:
Marcelo Moreira de Mello
Created:
2011-09-22 16:05:50 UTC
Size:
2.49 KB
patch
obsolete
>From: Marcelo Moreira de Mello <mmello@redhat.com> >Date: Thu, 22 Sep 2011 12:46:05 -0300 >Subject: [PATCH] 737697 - fixed rhn_check when deploying a group files and some files in that group does not have a valid UID/GID > >--- > client/tools/rhncfg/actions/configfiles.py | 24 ++++++++++++++++++++++-- > 1 files changed, 22 insertions(+), 2 deletions(-) > >diff --git a/client/tools/rhncfg/actions/configfiles.py b/client/tools/rhncfg/actions/configfiles.py >index 9ccb978..686d029 100755 >--- a/client/tools/rhncfg/actions/configfiles.py >+++ b/client/tools/rhncfg/actions/configfiles.py >@@ -16,6 +16,8 @@ > import os > import time > import sys >+import pwd >+import grp > > from config_common import local_config, file_utils, utils, cfg_exceptions > from config_common.rhn_log import set_debug_level, get_debug_level, set_logfile, log_to_file >@@ -209,6 +211,18 @@ def deploy(params, topdir=None, cache_only=None): > > _init() > files = params.get('files') or [] >+ files_excluded = [] >+ for member in reversed(range(len(files))): >+ uid = files[member].get('username') >+ gid = files[member].get('groupname') >+ if uid and gid: >+ try: >+ user_record = pwd.getpwnam(uid) >+ group_record = grp.getgrnam(gid) >+ except: >+ files_excluded.append(files[member]) >+ files.pop(member) >+ > dep_trans = DeployTransaction(transaction_root=topdir, auto_rollback=0) > > for file in files: >@@ -306,8 +320,14 @@ def deploy(params, topdir=None, cache_only=None): > return (49, "Failed deployment, rolled back: %s" % e, {}) > > extras = {} >- log_to_file(0, "Files successfully deployed: %s %s" % (format_file_string(files, create_key_list()), str(extras))) >- return 0, "Files successfully deployed", extras >+ extras_excluded = {} >+ if files_excluded: >+ log_to_file(0, "Some files were successfully deployed: %s %s" % (format_file_string(files, create_key_list()), str(extras))) >+ log_to_file(0, "Some files were not deployed for not having a valid uid/gid: %s %s" %(format_file_string(files_excluded, create_key_list()), str(extras_excluded))) >+ return 44, "Files successfully deployed but some files were not deployed for not having a valid uid/gid", extras_excluded >+ else: >+ log_to_file(0, "Files successfully deployed: %s %s" % (format_file_string(files, create_key_list()), str(extras))) >+ return 0, "Files successfully deployed", extras > > > def diff(params, cache_only=None): >-- >1.7.6.2 >
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 737697
: 524443