Howdy folks, 
 
 We created a patch which fix the rhncfg-client to honor the highest
rank for configuration files.

  cfg_sfdc-00437809     <--- highest rank
-----------
   * /etc/sfdc-00437809/file1  * locally managed
   * /etc/sfdc-00437809/file2
   * /etc/sfdc-00437809/duplicate

  cfg_sfdc-00437809_dup_LOW <--- lowest rank
-----------
    * /etc/sfdc-00437809/duplicate

Before applying the patch, rhncfg-client elist does not honor the rank
levels: 

# rhncfg-client elist
Mode          Owner Group          Size Rev                 Config Channel    
File
drw-r--r--     root root             *0   1              cfg_sfdc-00437809    
/etc/sfdc-00437809
-rw-r--r--     root root             81   5      cfg_sfdc-00437809_dup-LOW    
/etc/sfdc-00437809/duplicate
-rw-r--r--     root root             53   3                     1000010002    
/etc/sfdc-00437809/file1
-rw-r--r--     root root             61   2              cfg_sfdc-00437809    
/etc/sfdc-00437809/file2

After applying the patch and restarting the Spacewalk services, the
issue is solved


# rhncfg-client elist
Mode          Owner Group          Size Rev         Config Channel    File
drw-r--r--     root root             *0   1      cfg_sfdc-00437809    
/etc/sfdc-00437809
-rw-r--r--     root root             81   5      cfg_sfdc-00437809    
/etc/sfdc-00437809/duplicate
-rw-r--r--     root root             53   1             1000010002    
/etc/sfdc-00437809/file1
-rw-r--r--     root root             61   2      cfg_sfdc-00437809    
/etc/sfdc-00437809/file2


Thank you in advance!

 Cheers, 
Marcelo Moreira de Mello


-- 
Marcelo Moreira de Mello <mme...@redhat.com>
Red Hat Inc.
From: Marcelo Moreira de Mello <mme...@redhat.com>
Date: Tue, 12 Jul 2011 20:30:11 -0300
Subject: [PATCH] BZ#633400 - fix rhncfg-client elist to honor the rank levels

---
 .../handlers/config/rhn_config_management.py       |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/backend/server/handlers/config/rhn_config_management.py b/backend/server/handlers/config/rhn_config_management.py
index f35b3e4..273cefd 100644
--- a/backend/server/handlers/config/rhn_config_management.py
+++ b/backend/server/handlers/config/rhn_config_management.py
@@ -144,7 +144,12 @@ class ConfigManagement(configFilesHandler.ConfigFilesHandler):
                     break
 
                 path = row['path']
-                result_hash[path] = (config_channel, path, row['config_file_type_id'])
+
+                if not path in result_hash:
+                    result_hash[path] = (config_channel, path, row['config_file_type_id'])
+
+                if config_channel == str(self.server.getid()):
+                    result_hash[path] = (config_channel, path, row['config_file_type_id'])
 
         result = result_hash.values()
         # Sort by path first since that's what the web site does
-- 
1.7.6

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to