[Spacewalk-devel] [PATCH] - Fix channel arch on spacewalk-create-channel man page [pull request #21]
Hello, This patch fixes the channel arch on the spacewalk-create-channel man page. https://github.com/spacewalkproject/spacewalk/pull/21 Thanks. mmello -- Marcelo Moreira de Mello ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 1072100 - Duplicated packages are displayed on the event's history page after updating some packages on a client system
Hello spacewalkers, This patch addresses the issue report on the bugzilla #1072100 Thank you. mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Technical Support Engineer/GSS gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 3 Mar 2014 17:33:22 -0500 Subject: [PATCH] 1072100 - Fix duplicated package list when listing the event's history --- web/modules/rhn/RHN/DB/Server.pm | 31 ++- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/web/modules/rhn/RHN/DB/Server.pm b/web/modules/rhn/RHN/DB/Server.pm index 7cbed1e..89cc7ef 100644 --- a/web/modules/rhn/RHN/DB/Server.pm +++ b/web/modules/rhn/RHN/DB/Server.pm @@ -574,27 +574,16 @@ sub server_event_package_action { my $dbh = RHN::DB->connect; my $sth = $dbh->prepare(<execute_h(aid => $aid); while (my $row = $sth->fetchrow_hashref_copy) { -- 1.8.5.3 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - #1057196 - Adding rhnRepoRegenQueue output on spacewalk-debug
Hello, spacewalk-debug is a very interesting tool to collect the logs from Spacewalk/Satellite for troubleshooting purposes. Will be very helpful to have the the count(*) output from rhnRepoRegenQueue db table. This patch adds this capability on spacewalk-debug tool. Thank you. mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Technical Support Engineer/GSS gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 >From 6c37b3676ea9cdd25c56974945c4e8c71767904b Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Thu, 23 Jan 2014 10:47:00 -0500 Subject: [PATCH] BZ#1057196 - Add rhnRepoRegenQueue output on spacewalk-debug --- backend/satellite_tools/spacewalk-debug | 5 + 1 file changed, 5 insertions(+) diff --git a/backend/satellite_tools/spacewalk-debug b/backend/satellite_tools/spacewalk-debug index d918973..3455390 100755 --- a/backend/satellite_tools/spacewalk-debug +++ b/backend/satellite_tools/spacewalk-debug @@ -204,6 +204,11 @@ if [ -f /usr/bin/db-control ] ; then /usr/bin/db-control report > $DIR/db-control-report fi +echo "* querying Taskomatic queued jobs" +if [ -f /usr/bin/spacewalk-sql ]; then +echo "select count(*) from rhnRepoRegenQueue;" | /usr/bin/spacewalk-sql --select-mode - > $DIR/rhnRepoRegenQueue +fi + echo "* get diskspace available" df -h > $DIR/diskinfo -- 1.8.5.3 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 982673 - rhnsd minimum interval should fit within 1 minute
Hello team, Following attached a patch to address the issue reported on bug #982673. Thanks. mmello -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Tue, 9 Jul 2013 11:32:05 -0300 Subject: [PATCH] 982673 - Fixed rhnsd man page and adjusted the minimum polling interval to 1 minute --- client/rhel/rhnsd/man/en/rhnsd.8 | 6 -- client/rhel/rhnsd/rhnsd.c| 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/rhel/rhnsd/man/en/rhnsd.8 b/client/rhel/rhnsd/man/en/rhnsd.8 index aca82e9..50836a5 100644 --- a/client/rhel/rhnsd/man/en/rhnsd.8 +++ b/client/rhel/rhnsd/man/en/rhnsd.8 @@ -33,8 +33,10 @@ available. If any are queued, rhnsd will execute those actions. rhnsd is typically started from the initialization (init) scripts in \fI/etc/init.d/rhnsd\fP. when it's time to poll the Spacewalk server for available -updates and actions. The default interval is every 240 minutes. -The minimum polling interval is 60 minutes. +updates and actions. The default interval is every 240 minutes. +The minimum polling interval is 1 minute. A polling interval of less +than 60 minutes will get your server blocked if you are connecting to +rhn.redhat.com. .PP To check for updates, rhnsd runs an external program called \fBrhn_check\fR. This is a small application that actually diff --git a/client/rhel/rhnsd/rhnsd.c b/client/rhel/rhnsd/rhnsd.c index 5f0711d..2b5a1c6 100644 --- a/client/rhel/rhnsd/rhnsd.c +++ b/client/rhel/rhnsd/rhnsd.c @@ -98,7 +98,7 @@ static void unset_signal_handlers (void); static void SIGHUP_handler(int); /* Arguments */ -#define MIN_INTERVAL 60 /* minimal sane interval; RHN will blacklist +#define MIN_INTERVAL 1 /* minimal sane interval; RHN will blacklist if lower, so don't think you can recompile with a lower value than this. */ -- 1.8.3.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Added taskomatic.channel_repodata_workers to rhn.conf man page
Hello team, Here is a patch to add to rhn.conf some documentation about taskomatic.channel_repodata_workers. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Wed, 17 Apr 2013 00:05:57 -0300 Subject: [PATCH] Added taskomatic.channel_repodata_workers to rhn.conf man page --- spacewalk/config/usr/share/man/man5/rhn.conf.5 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/spacewalk/config/usr/share/man/man5/rhn.conf.5 b/spacewalk/config/usr/share/man/man5/rhn.conf.5 index 27af8c9..e3f1074 100644 --- a/spacewalk/config/usr/share/man/man5/rhn.conf.5 +++ b/spacewalk/config/usr/share/man/man5/rhn.conf.5 @@ -225,6 +225,16 @@ This parameter controls which is the maximum allowed size for configuration file .B Default: 32768 +.TP +.B "taskomatic.channel_repodata_workers" (integer) +This parameter controls how many repodata workers should generate repodata information concurrently. +If the number of repodata workers running on the system are bigger than defined on +.B taskomatic.channel_repodata_workers, +then the job will be queued. +.IP +.B Default: +2 + .SS Database Options .TP -- 1.8.1.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#836984 - fixes the permissions on /var/log/osad log file
On 12/07/2012 05:20 AM, Jan Pazdziora wrote: >> Hello Folks, >> > >> >Here follow a better looking patch. Please, ignore the previous one. > [...] > >> > try: >> > -file = open( Logger.logfile, 'a' ) >> > -os.chmod(Logger.logfile, 0600) >> > -file.write( outstring ) >> > -file.close() >> > +fd = os.open(Logger.logfile, os.O_APPEND | os.O_RDWR >> > | os.O_CREAT, 0600) >> > +os.write(fd, outstring) >> > +os.close() > Either patch will fail with > > TypeError: close() takes exactly 1 argument (0 given) Hello Jan, Thanks for heads up. Follow attached an updated version. Thank you. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Fri, 7 Dec 2012 16:24:44 -0200 Subject: [PATCH] 836984 - fixes the permissions on /var/log/osad log file --- client/tools/osad/osad.spec | 5 + client/tools/osad/src/rhn_log.py | 7 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec index 57014b7..b954b59 100644 --- a/client/tools/osad/osad.spec +++ b/client/tools/osad/osad.spec @@ -202,6 +202,11 @@ rm -rf $RPM_BUILD_ROOT if [ -f %{_sysconfdir}/init.d/osad ]; then /sbin/chkconfig --add osad fi + +# Fix the /var/log/osad permission BZ 836984 +if [ -f %{_var}/log/osad ]; then +/bin/chmod 600 %{_var}/log/osad +fi %endif %preun diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py index 7b23501..3607c1a 100644 --- a/client/tools/osad/src/rhn_log.py +++ b/client/tools/osad/src/rhn_log.py @@ -39,10 +39,9 @@ class Logger: if not Logger.logfile is None: try: -file = open( Logger.logfile, 'a' ) -os.chmod(Logger.logfile, 0600) -file.write( outstring ) -file.close() +fd = os.open(Logger.logfile, os.O_APPEND | os.O_RDWR | os.O_CREAT, 0600) +os.write(fd, outstring) +os.close(fd) except IOError: raise -- 1.8.0.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#836984 - fixes the permissions on /var/log/osad log file
On 12/06/2012 03:42 PM, Marcelo Moreira de Mello wrote: Hello Folks, Here follow a better looking patch. Please, ignore the previous one. Thank you. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 6 Dec 2012 15:58:03 -0200 Subject: [PATCH] 836984 - fixes the permissions on /var/log/osad log file --- client/tools/osad/osad.spec | 5 + client/tools/osad/src/rhn_log.py | 7 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec index 57014b7..b954b59 100644 --- a/client/tools/osad/osad.spec +++ b/client/tools/osad/osad.spec @@ -202,6 +202,11 @@ rm -rf $RPM_BUILD_ROOT if [ -f %{_sysconfdir}/init.d/osad ]; then /sbin/chkconfig --add osad fi + +# Fix the /var/log/osad permission BZ 836984 +if [ -f %{_var}/log/osad ]; then +/bin/chmod 600 %{_var}/log/osad +fi %endif %preun diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py index 7b23501..0b1f85d 100644 --- a/client/tools/osad/src/rhn_log.py +++ b/client/tools/osad/src/rhn_log.py @@ -39,10 +39,9 @@ class Logger: if not Logger.logfile is None: try: -file = open( Logger.logfile, 'a' ) -os.chmod(Logger.logfile, 0600) -file.write( outstring ) -file.close() +fd = os.open(Logger.logfile, os.O_APPEND | os.O_RDWR | os.O_CREAT, 0600) +os.write(fd, outstring) +os.close() except IOError: raise -- 1.8.0.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#836984 - fixes the permissions on /var/log/osad log file
Hello Folks, Follow attach a patch which addressed the issue reported on BZ#836984. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 6 Dec 2012 15:33:55 -0200 Subject: [PATCH] 836984 - fixes the permissions on /var/log/osad log file --- client/tools/osad/osad.spec | 7 +++ client/tools/osad/src/rhn_log.py | 7 +++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec index 57014b7..eaa0a8e 100644 --- a/client/tools/osad/osad.spec +++ b/client/tools/osad/osad.spec @@ -276,6 +276,13 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {} /sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log %endif +# Fix the /var/log/osad permission BZ 836984 +%post +if [ -f %{_var}/log/osad ]; then +/bin/chmod 600 %{_var}/log/osad +fi +%endif + %files %dir %{rhnroot}/osad %attr(755,root,root) %{_sbindir}/osad diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py index 7b23501..0b1f85d 100644 --- a/client/tools/osad/src/rhn_log.py +++ b/client/tools/osad/src/rhn_log.py @@ -39,10 +39,9 @@ class Logger: if not Logger.logfile is None: try: -file = open( Logger.logfile, 'a' ) -os.chmod(Logger.logfile, 0600) -file.write( outstring ) -file.close() +fd = os.open(Logger.logfile, os.O_APPEND | os.O_RDWR | os.O_CREAT, 0600) +os.write(fd, outstring) +os.close() except IOError: raise -- 1.8.0.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] BZ#874278 - API method errata.findByCve() returns java exception java.util.ConcurrentModificationException() when listing erratas
Howdy Spacewalk folks, Here follow a patch which addressed the issue reported on BZ#874278. Further details on the bz. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Wed, 7 Nov 2012 21:47:20 -0200 Subject: [PATCH] fixed errata.findByCve() method for seek big lists Caused by: java.util.ConcurrentModificationException at java.util.LinkedList$LinkIterator.next(LinkedList.java:119) at com.redhat.rhn.frontend.xmlrpc.errata.ErrataHandler.findByCve(ErrataHandler.java:1427) --- .../src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java index f86058c..2a7baaa 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/errata/ErrataHandler.java @@ -1461,11 +1461,12 @@ public class ErrataHandler extends BaseHandler { User loggedInUser = getLoggedInUser(sessionKey); List erratas = ErrataManager.lookupByCVE(cveName); -for (Errata errata : erratas) { +for (Iterator iter = erratas.iterator(); iter.hasNext();) { +Errata errata = (Errata) iter.next(); // Remove errata that do not apply to the user's org if (errata.getOrg() != null && !errata.getOrg().equals(loggedInUser.getOrg())) { -erratas.remove(errata); +iter.remove(); } } return erratas; -- 1.8.0 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Fixed typo on ErrataMailer.java
Hello Folks, This patch fixes a small type on ErrataMailer.java Thank you. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 4 Oct 2012 02:13:34 -0300 Subject: [PATCH] Fixed typo on ErrataMailer.java --- java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java b/java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java index 06622ac..20b427d 100644 --- a/java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java +++ b/java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java @@ -134,7 +134,7 @@ public class ErrataMailer extends RhnJavaJob { String email = (String) userInfo.get("email"); String login = (String) userInfo.get("login"); List servers = userMap.get(userId); -log.info("Nofification for user " + login + "(" + userId + ") about " + +log.info("Notification for user " + login + "(" + userId + ") about " + servers.size() + " relevant server(s)."); String emailBody = formatEmail(login, email, errata, servers); Mail mail = new SmtpMail(); -- 1.7.11.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] spacewalk-backend-xp package is missing at nightly repo for RHEL6
On 07/04/2012 04:41 AM, Jan Pazdziora wrote: > Fixed in 6240d39588718c5463489c6104f3552076253414. Users of stable > Spacewalk releases will never see the error thou because they will > not have 1.8.33 to 1.8.37 installed (and want to upgrade from it). In > general, rolling upgrades of Spacewalk nightly are expected to cause > issues like this. Hello Guys, Jan, thank you for the clarification. I fixed it by hand here and all working fine. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] spacewalk-backend-xp package is missing at nightly repo for RHEL6
Hello team, Builing locally the package the spacewalk-backend-xp was not built. $ git branch * master $ git remote -v origin git://git.fedorahosted.org/git/spacewalk.git/ (fetch) origin git://git.fedorahosted.org/git/spacewalk.git/ (push) $ tito build --srpm $ rpmbuild --rebuild /tmp/tito/spacewalk-backend-1.8.45-1.el6.src.rpm { SNIP } Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/mmello/rpmbuild/BUILDROOT/spacewalk-backend-1.8.45-1.el6.x86_64 Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-sql-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-sql-oracle-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-sql-postgresql-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-server-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-xmlrpc-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-applet-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-app-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-iss-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-iss-export-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-libs-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-config-files-common-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-config-files-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-config-files-tool-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-package-push-server-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-tools-1.8.45-1.el6.noarch.rpm Wrote: /home/mmello/rpmbuild/RPMS/noarch/spacewalk-backend-xml-export-libs-1.8.45-1.el6.noarch.rpm Looking the git log it seems that spacewalk-backend-xp was removed $ git show 6bf583de308bcd13fdcfc8b7c8e0391991715556 Author: Michael Mraka Date: Tue Jun 12 10:36:15 2012 +0200 removed -xp subpackage Should we fix the SPEC in order to automatically remove the spacewalk-backend-xp instead showing the RPM conflicting message? Best Regards, mmello - Original Message - From: "Marcelo Moreira de Mello" To: "spacewalk-devel" Sent: Tuesday, July 3, 2012 7:03:20 PM Subject: [Spacewalk-devel] spacewalk-backend-xp package is missing at nightly repo for RHEL6 Hello team, It seems that spacewalk-backend-xp package is missing at nightly repo http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/ --> Processing Dependency: spacewalk-backend-server = 1.8.33-1.el6 for package: spacewalk-backend-xp-1.8.33-1.el6.noarch ---> Package spacewalk-backend-server.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-sql.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-sql.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-sql-postgresql.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-sql-postgresql.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-tools.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-tools.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-xml-export-libs.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-xml-export-libs.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-xmlrpc.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-xmlrpc.noarch 0:1.8.45-1.el6 will be an update --> Finished Dependency Resolution Error: Package: spacewalk-backend-xp-1.8.33-1.el6.noarch (@spacewalk-nightly) Requires: spacewalk-backend-server = 1.8.33-1.el6 Removing: spacewalk-backend-server-1.8.33-1.el6.noarch (@spacewalk-nightly) spacewalk-backend-server = 1.8.33-1.el6 Updated By: spacewalk-backend-server-1.8.45-1.el6.noarch (spacewalk-nightly) spacewalk-backend-server = 1.8.45-1.el6 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest # rpm -q spacewalk-backend-xp spacewalk-backend-xp-1.8.33-1.el6.noarch # wget http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/spacewalk-backend-xp-1.8.45-1.el6.noarch.rpm --2012-07-03 19:01:38-- http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/spacewalk-backend-xp-1.8.45-1.el6.noarch.rpm Resolving spacewalk.redhat.com... 209.132.183.81 Connecting to spacewalk.redhat.com|209.132.183.81|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-07-03 19:01:39 ERROR 404: Not Found. Best, mmello -- Marcelo Mor
[Spacewalk-devel] spacewalk-backend-xp package is missing at nightly repo for RHEL6
Hello team, It seems that spacewalk-backend-xp package is missing at nightly repo http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/ --> Processing Dependency: spacewalk-backend-server = 1.8.33-1.el6 for package: spacewalk-backend-xp-1.8.33-1.el6.noarch ---> Package spacewalk-backend-server.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-sql.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-sql.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-sql-postgresql.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-sql-postgresql.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-tools.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-tools.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-xml-export-libs.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-xml-export-libs.noarch 0:1.8.45-1.el6 will be an update ---> Package spacewalk-backend-xmlrpc.noarch 0:1.8.33-1.el6 will be updated ---> Package spacewalk-backend-xmlrpc.noarch 0:1.8.45-1.el6 will be an update --> Finished Dependency Resolution Error: Package: spacewalk-backend-xp-1.8.33-1.el6.noarch (@spacewalk-nightly) Requires: spacewalk-backend-server = 1.8.33-1.el6 Removing: spacewalk-backend-server-1.8.33-1.el6.noarch (@spacewalk-nightly) spacewalk-backend-server = 1.8.33-1.el6 Updated By: spacewalk-backend-server-1.8.45-1.el6.noarch (spacewalk-nightly) spacewalk-backend-server = 1.8.45-1.el6 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest # rpm -q spacewalk-backend-xp spacewalk-backend-xp-1.8.33-1.el6.noarch # wget http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/spacewalk-backend-xp-1.8.45-1.el6.noarch.rpm --2012-07-03 19:01:38-- http://spacewalk.redhat.com/yum/nightly/RHEL/6/x86_64/spacewalk-backend-xp-1.8.45-1.el6.noarch.rpm Resolving spacewalk.redhat.com... 209.132.183.81 Connecting to spacewalk.redhat.com|209.132.183.81|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2012-07-03 19:01:39 ERROR 404: Not Found. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] 798571 - Timezone definitions outdated for russian TZs
On 07/03/2012 07:01 AM, Jan Pazdziora wrote: > On Mon, Jul 02, 2012 at 05:12:58PM -0300, Marcelo Moreira de Mello wrote: >> Hello team, >> >> Here follow a patch which fixed the issue reported on BZ#798571. > Marcelo, > > are we sure that it's just the description change that is needed? Do > the timezones otherwise work as expected on both Perl and Java stacks, > or is some logic change needed as well? > Hello Jan, I thought the same when I was changing the code. Then, I checked the git changelog and saw some commits which only changed the description (0518d03935bdefa5cf0a1e5b76b7f44105eaf6f2 per example). Looking the commit b77210efc1f39fbb095f47b8c67580045b4b6165, it seems that the trick to the Perl and Java stacks seems to use the timezone description (such as America/Sao_Paulo). After changing the code, the webUI displayed the Russian time using GMT+4 as expected. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] 798571 - Timezone definitions outdated for russian TZs
Hello team, Here follow a patch which fixed the issue reported on BZ#798571. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 2 Jul 2012 17:09:31 -0300 Subject: [PATCH] 798571 - fix timezones definitions for Russian --- .../redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_de.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_en_US.xml |2 +- .../com/redhat/rhn/frontend/strings/database/StringResource_es.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_fr.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_gu.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_hi.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_it.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ja.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ko.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_pa.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_pt_BR.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ru.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ta.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_zh_CN.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_zh_TW.xml |4 ++-- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml index 1ee27ea..832e46e 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml @@ -128,11 +128,11 @@ (GMT+০৮০০) ঠসà§à¦à§à¦°à§à¦²à¦¿à§à¦¾ (পশà§à¦à¦¿à¦®à¦¾à¦à§à¦à¦²) -(GMT+0300) Russia (Moscow) +(GMT+0400) Russia (Moscow) /rhn/account/UserDetails -(GMT+০৩০০) রাশিà§à¦¾ (মসà§à¦à§) +(GMT+০৪০০) রাশিà§à¦¾ (মসà§à¦à§) (GMT+0200) Europe (Eastern) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml index 8e7e147..c3642a1 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml @@ -128,11 +128,11 @@ (GMT+0800) Australien (West) -(GMT+0300) Russia (Moscow) +(GMT+0400) Russia (Moscow) /rhn/account/UserDetails -(GMT+0300) Russland (Moskau) +(GMT+0400) Russland (Moskau) (GMT+0200) Europe (Eastern) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_en_US.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_en_US.xml index 019fca4..51dd79e 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_en_US.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_en_US.xml @@ -134,7 +134,7 @@ http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd"; -(GMT+0300) Russia (Moscow) +(GMT+0400) Russia (Moscow) /rhn/account/UserDetails diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml index 84d7b92..8ef7204 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml @@ -128,11 +128,11 @@ (GMT+0800) Australia (Occidental) -(GMT+0300) Russia (Moscow) +(GMT+0400) Russia (Moscow) /rhn/account/UserDetails -(GMT+0300) Rusia (Moscú) +(GMT+0400) Rusia (Moscú) (GMT+0200) Europe (Eastern) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml index 1f256fa..d24e07e 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml @@ -128,11 +128,11 @@ (GMT+0800) Australie (de l'ouest) -(GMT+0300) Russia (Moscow) +(GMT+0400) Russia (Moscow) /rhn/account/UserDetails -
[Spacewalk-devel] [PATCH] - 831320 - system.config.listFiles() is taking too long to return data
Hello Team, Here follow a patch to fix a silly detail on the excellent job by sherr. This patch address the issue introduced by commit 6bba7b2a49e5aea7eab21533de5bb88cd41857ad Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 19 Jun 2012 19:50:39 -0300 Subject: [PATCH] 831320 - removed the ';' character due the error ORA-00911 Caused by: com.redhat.rhn.common.db.WrappedSQLException: ORA-00911: invalid character --- .../src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml index eae5676..5f71e50 100644 --- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml +++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/config_queries.xml @@ -1320,7 +1320,7 @@ select cc.label as config_channel_label, and cf.config_channel_id = cc.id and cf.config_file_name_id = cfn.id and cr.config_file_type_id = cft.id -order by cfn.path; +order by cfn.path -- 1.7.10.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - Other Enhancements pt_BR localization at webUI
On 28/05/2012, at 06:16, Tomas Lestach wrote: > I have no idea idea, what I've committed as I do not speak Brazilian. > I'll trust you, Marcelo. :-) Hehehe.. :) Thanks Tomas > > Committed as: 261cbfead0f26ac7159c94fb1990e3e745ea773d > > Thanks, > -- > Tomas Lestach > RHN Satellite Engineering, Red Hat ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Other Enhancements pt_BR localization at webUI
Hello Team, Follow some other changes on the translation to pt_BR (Brazilian). Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 >From ea7c4048e573c750e1d10728570a4945d3955194 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Fri, 25 May 2012 14:28:27 -0300 Subject: [PATCH] Enhancements pt_BR localization at webUI --- .../frontend/strings/java/StringResource_pt_BR.xml |6 +- .../frontend/strings/jsp/StringResource_pt_BR.xml | 74 ++-- .../frontend/strings/nav/StringResource_pt_BR.xml | 10 +-- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 39a0837..9434296 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -1636,7 +1636,7 @@ /rhn/systems/details/configuration/addfiles/ImportFileConfirm.do - {0} files <a href="{1}">agendado</a> para carregar. + {0} arquivo(s) <a href="{1}">agendado(s)</a> para carregar. Import config file data from system @@ -6408,7 +6408,7 @@ Follow this url to see the full list of inactive systems: /rhn/configuration/file/CompareCopy.do - Modo Seguro + Quarentena @@ -6604,7 +6604,7 @@ Follow this url to see the full list of inactive systems: /rhn/systems/details/Overview.do /rhn/systems/details/Edit.do - Notificações de email desativadas mundialmente + Notificações de email desativadas Manually locked diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml index 44f5d9e..909394e 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml @@ -3470,7 +3470,7 @@ abaixo e <b>não poderá mais se autenticar</b>. /rhn/admin/multiorg/Users.do - Usuários cadastrados no @@PRODUCT_NAME@@ + Usuários Cadastrados no @@PRODUCT_NAME@@ Organization Details @@ -8338,13 +8338,13 @@ Please note that some manual configuration of these scripts may still be require URL do Repositório Create Repository -Cria um Repositório +Criar Repositório Update Repository -Atualiza um Repositório +Atualizar Repositório Delete Repository -Deleta um Repositório +Deletar Repositório Repository created successfully Repositório criado com êxito @@ -11390,7 +11390,7 @@ o <strong>Guia de Administração de Sistemas Red Hat Enterprise Li canal de configuração gerenciado localmente configuration sandbox -Modo Seguro de configuração +Configuração da Ãrea de Quarentena file @@ -12660,7 +12660,7 @@ You may grant provisioning entitlements _here_. You can't deploy this file to any systems because this file is part of a config sandbox local to system _zanarkand.boston.redhat.com_. - Você não pode implementar este arquivo em qualquer sistema, pois este arquivo é parte de uma configuração de modo seguro local para sistema + Você não pode implementar este arquivo em qualquer sistema, pois este arquivo é parte de uma configuração da área de quarentena do sistema <a href="{1}">{0}</a>. Configuration sandboxes are a place to store configuration files that are under development. @@ -12672,7 +12672,7 @@ From there, you can deploy the file to systems. Modos Seguros de Configuração são locais para armazenar arquivos de configuração que estejam em construção. Se você acredita que este arquivo de configuração está pronto para a implementação em um sistema, você pode <a href="{0}">copiá-lo para um canal de configuração gerenciado localmente</a> -ou <a href="{1}">copiá-lo para um canal de configuração gerenciado mundialmente</a> através da aba '<a href="{3}">{4}</a>' acima. +ou <a href="{1}">copiá-lo para um canal de configuração global</a> através da aba '<a href="{3}">{4}</a>' acima. A partir daqui, você pode implementar o arquivo em sistemas. @@ -12864,7 +12864,
[Spacewalk-devel] [PATCH] - 817098 - Brazilian GMT is wrong when the locale is different than English on webUI
Hello folks, Here follow a patch which address the issue reported on bz in $subject. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Fri, 27 Apr 2012 14:29:15 -0300 Subject: [PATCH] 817098 - fixed the Brazilian time zone --- .../redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_de.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_es.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_fr.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_gu.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_hi.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_it.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ja.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ko.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_pa.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_pt_BR.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ru.xml |4 ++-- .../com/redhat/rhn/frontend/strings/database/StringResource_ta.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_zh_CN.xml |4 ++-- .../redhat/rhn/frontend/strings/database/StringResource_zh_TW.xml |4 ++-- 15 files changed, 30 insertions(+), 30 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml index 422cdd4..1ee27ea 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_bn_IN.xml @@ -324,11 +324,11 @@ (GMT-১১০০) মিডà¦à§à§ -(GMT-0200) Brazil +(GMT-0300) Brazil /rhn/account/UserDetails -(GMT-০২০০) বà§à¦°à¦¾à¦à¦¿à¦² +(GMT-০৩০০) বà§à¦°à¦¾à¦à¦¿à¦² (GMT-0500) United States (Indiana) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml index 4013924..8e7e147 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_de.xml @@ -324,11 +324,11 @@ (GMT-1100) Midwayinseln -(GMT-0200) Brazil +(GMT-0300) Brazil /rhn/account/UserDetails -(GMT-0200) Brasilien +(GMT-0300) Brasilien (GMT-0500) United States (Indiana) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml index 0b2e73c..84d7b92 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_es.xml @@ -324,11 +324,11 @@ (GMT-1100) Midway -(GMT-0200) Brazil +(GMT-0300) Brazil /rhn/account/UserDetails -(GMT-0200) Brasil +(GMT-0300) Brasil (GMT-0500) United States (Indiana) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml index 07da9e0..1f256fa 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_fr.xml @@ -324,11 +324,11 @@ (GMT-1100) Midway -(GMT-0200) Brazil +(GMT-0300) Brazil /rhn/account/UserDetails -(GMT-0200) Brésil +(GMT-0300) Brésil (GMT-0500) United States (Indiana) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_gu.xml b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_gu.xml index d9c389a..0d1df62 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_gu.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_gu.xml @@ -324,11 +324,11 @@ (GMT-1100) મà«àª¡àªµà« -(GMT-0200) Brazil +(GMT-0300) Brazil /rhn/account/UserDetails -(GMT-0200) બà«àª°àª¾àªàª¿àª² +(GMT-0300) બà«àª°àª¾àªàª¿àª² (GMT-0500) United States (Indiana) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/database/StringResource_hi.xml b/java/code/src/com/redhat/rhn/frontend/strings/database
[Spacewalk-devel] [PATCH] - 816445 Registration fails on kickstart process due a code error in redhat_register snippet
Hello Folks, Following attached a patch which solves the issue reported on BZ#816445. Thank you. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 26 Apr 2012 02:24:05 -0300 Subject: [PATCH] 816445 - fixed error in redhat_register snippet --- java/conf/cobbler/snippets/redhat_register |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/conf/cobbler/snippets/redhat_register b/java/conf/cobbler/snippets/redhat_register index bcd4e1f..e3e4c17 100644 --- a/java/conf/cobbler/snippets/redhat_register +++ b/java/conf/cobbler/snippets/redhat_register @@ -6,7 +6,7 @@ mkdir -p /usr/share/rhn/ #set $mycert = "/usr/share/rhn/" + $mycert_file wget http://$redhat_management_server/pub/RHN-ORG-TRUSTED-SSL-CERT -O $mycert perl -npe 's/RHNS-CA-CERT/$mycert_file/g' -i /etc/sysconfig/rhn/* -if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ] +if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release ]; then rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release fi #end if -- 1.7.10 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] SysV to Systemd
Hello Miroslav, We are working (Pablo and me) on this and probably this weekend we will submit the patches to be approved. We are doing the final tests on those scripts. I'll keep you updated. Best, mmello Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer - SEG gpg id: 2048/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 On 28/03/2012, at 09:49, Miroslav Suchý wrote: > > Hi Marcelo, what is status of your work? > > > -- > Miroslav Suchy > Red Hat Satellite Engineering ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 804702 deployAllSystems() documentation on the webUI does know show the date parameter when calling the method
Hello Folks, Here follow a patch addressed for the BZ in the subject. Already added further details on the BZ. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 19 Mar 2012 13:28:45 -0300 Subject: [PATCH] 804702 - fixed apidoc deployAllSystems() including the date parameter --- .../xmlrpc/configchannel/ConfigChannelHandler.java |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java index 4a247f8..8c7f6e5 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/configchannel/ConfigChannelHandler.java @@ -776,7 +776,8 @@ public class ConfigChannelHandler extends BaseHandler { * @xmlrpc.param #session_key() * @xmlrpc.param #param_desc("string","channelLabel", * "The configuration channel's label.") - * @xmlrpc.param #param_desc($date, "The date to schedule the action") + * @xmlrpc.param #param_desc("dateTime.iso8601","date", + * "The date to schedule the action") * @xmlrpc.returntype #return_int_success() */ public int deployAllSystems(String sessionKey, String channelLabel, Date date) { -- 1.7.7.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 784158 - spacewalk-service does not offer a way to disable some services
Hello team, Here follow 3 patches which includes a capability to Spacewalk ignore to start some services when running the /usr/sbin/spacewalk-service script. Below is an example after applied the patch excluding the Taskomatic service to be started: # cat /etc/rhn/disabled-services DISABLED_SERVICES="taskomatic" # spacewalk-service start Starting spacewalk services... Initializing jabberd processes ... Starting router: [ OK ] Starting sm: [ OK ] Starting c2s: [ OK ] Starting s2s: [ OK ] Starting Oracle Net Listener ... [ OK ] Starting Oracle DB instance "rhnsat" ... [ OK ] Starting osa-dispatcher: [ OK ] Starting tomcat6: [ OK ] Starting httpd:[ OK ] Starting Monitoring ... [ OK ] Starting MonitoringScout ... [ OK ] Starting rhn-search... Starting cobbler daemon: SERVING! [ OK ] Done. # spacewalk-service status router (pid 20117) is running... sm (pid 20124) is running... c2s (pid 20131) is running... s2s (pid 20138) is running... Oracle Net Listener (pid 20189) is running... Oracle DB instance rhnsat (pid 20201) is running... osa-dispatcher (pid 20245) is running... tomcat6 (pid 20316) is running... [ OK ] httpd (pid 20339) is running... rhn-search is running (20386). cobblerd (pid 20421) is running... # /etc/init.d/taskomatic status RHN Taskomatic is not running. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 23 Jan 2012 21:58:26 -0500 Subject: [PATCH 1/3] 784158 - created the file /etc/rhn/disabled-services which specifies the services ignored by /usr/sbin/spacewalk-service --- spacewalk/admin/disabled-services |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) create mode 100644 spacewalk/admin/disabled-services diff --git a/spacewalk/admin/disabled-services b/spacewalk/admin/disabled-services new file mode 100644 index 000..8ee661f --- /dev/null +++ b/spacewalk/admin/disabled-services @@ -0,0 +1,2 @@ +#uncomment the line below to configure the services which will be ignored by /usr/sbin/spacewalk-service script +#DISABLED_SERVICES="taskomatic rhn-search" -- 1.7.7.5 From: Marcelo Moreira de Mello Date: Mon, 23 Jan 2012 22:03:12 -0500 Subject: [PATCH 2/3] 784158 - exclude the services set at /etc/rhn/disabled-services when executing /usr/sbin/spacewalk-service --- spacewalk/admin/spacewalk-service |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/spacewalk/admin/spacewalk-service b/spacewalk/admin/spacewalk-service index 45feaef..1a97ebc 100755 --- a/spacewalk/admin/spacewalk-service +++ b/spacewalk/admin/spacewalk-service @@ -35,6 +35,13 @@ fi SERVICES="jabberd $DB_SERVICE osa-dispatcher $TOMCAT httpd Monitoring MonitoringScout rhn-search cobblerd taskomatic" +if [ -f /etc/rhn/disabled-services ]; then +source /etc/rhn/disabled-services +for srv in $DISABLED_SERVICES; do +SERVICES=${SERVICES/$srv/} +done +fi + . /etc/init.d/functions forward_services() { -- 1.7.7.5 From: Marcelo Moreira de Mello Date: Mon, 23 Jan 2012 22:06:20 -0500 Subject: [PATCH 3/3] 784158 - edited the SPEC file to install the /etc/rhn/disabled-services configuration file --- spacewalk/admin/spacewalk-admin.spec |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/spacewalk/admin/spacewalk-admin.spec b/spacewalk/admin/spacewalk-admin.spec index 17006c1..a369ea8 100644 --- a/spacewalk/admin/spacewalk-admin.spec +++ b/spacewalk/admin/spacewalk-admin.spec @@ -41,6 +41,7 @@ mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8/ %{_bindir}/pod2man --section=8 rhn-config-satellite.pl > $RPM_BUILD_ROOT%{_mandir}/man8/rhn-config-satellite.pl.8 install -p man/rhn-satellite.8 $RPM_BUILD_ROOT%{_mandir}/man8/ install -p man/validate-sat-cert.pl.8 $RPM_BUILD_ROOT%{_mandir}/man8/ +install -p disabled-services $RPM_BUILD_ROOT%{_sysconfdir}/rhn chmod 0644 $RPM_BUILD_ROOT%{_mandir}/man8/*.8* ln -s spacewalk-service $RPM_BUILD_ROOT%{_sbindir}/rhn-satellite @@ -52,6 +53,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{rhnroot} %{_sbindir}/spacewalk-service %{_sbindir}/rhn-satellite +%{_sysconfdir}/rhn/disabled-services %{_bindir}/validate-sat-cert.pl %{_bindir}/validate-sat-cert %{_bindir}/rhn-config-satellite.pl -- 1.7.7.5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [Spacewalk-list] Spacewalk 1.6 has been released
Congratulations to everyone!! :) Best, mmello On 12/22/2011 02:01 PM, Milan Zazrivec wrote: Hello world, we are happy to announce the release 1.6 of Spacewalk, platform for management of Linux systems. The download locations are http://spacewalk.redhat.com/yum/1.6/RHEL/5/$basearch/ http://spacewalk.redhat.com/yum/1.6/RHEL/6/$basearch/ http://spacewalk.redhat.com/yum/1.6/Fedora/15/x86_64/ http://spacewalk.redhat.com/yum/1.6/Fedora/16/x86_64/ with client repositories under http://spacewalk.redhat.com/yum/1.6-client http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.6/openSUSE_11.4/ http://download.opensuse.org/repositories/systemsmanagement:/spacewalk:/1.6/openSUSE_Factory/ http://miroslav.suchy.cz/spacewalk/debian If you want to do fresh installation, use steps from https://fedorahosted.org/spacewalk/wiki/HowToInstall If you plan to upgrade from older release, the following page can be useful: http://fedorahosted.org/spacewalk/wiki/HowToUpgrade Features& Enhancements in Spacewalk 1.6 * IPv6 support: management and provisioning capabilities * Support for Fedora 16 (server and client) * Kickstarting via Spacewalk Proxy with a CNAME * spacewalk-repo-sync supports --include and --exclude options * New API calls: channel.software.getRepoSyncCronExpression channel.software.listChannelRepos channel.software.setDetails channel.software.syncRepo configchannel.deleteFileRevisions configchannel.getFileRevision configchannel.getFileRevisions kickstart.disableProfile kickstart.isProfileDisabled kickstart.keys.update system.custominfo.updateKey system.deleteGuestProfiles system.deleteTagFromSnapshot system.getScriptActionDetails system.provisioning.snapshot.addTagToSnapshot system.tagLatestSnapshot * OSAD improvements * Security fixes for following CVEs: CVE-2011-1594 CVE-2011-2919 CVE-2011-2920 CVE-2011-2927 CVE-2011-3344 * rhn-virtualization supports RHEV 3 hosts * spacewalk-reports supports --where- option to filter records * spacecmd enhancements and bugfixes * Preliminary support for cobbler 2.2 Contributors Our thanks go to the community members who contributed to this release: Andy Speagle Aron Parsons Christian Berendt Colin Coe David Nutter Ionuț Arțăriși Johannes Renner Jonathan Hoser Joshua Roys Luca Villa Marcelo Moreira de Mello Martin Osvald Michael Calmer Pierre Casenove Satoru SATOH Steve Hardy Sven Mueller Tasos Papaioannou Uwe Gansert https://fedorahosted.org/spacewalk/wiki/ContributorList Some statistics In Spacewalk 1.6, we've seen 177 bugs solved 1025 changesets committed 1515 commits done Thank you for using Spacewalk! Keep the patches flowing! Regards -Milan Zázrivec ___ Spacewalk-list mailing list spacewalk-l...@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#765816 - Add an option into rhncfg-manager to allow file/directory to be uploaded without setting a SELinux context
Hello Mirek, This part: +selinux_ctx = None +if type(self.options.selinux_context) != None: +selinux_ctx = self.options.selinux_context +else: +selinux_ctx = '' and +if type(selinux_ctx) == str: +params.update({ +'selinux_ctx' : selinux_ctx, +)} means that you always override selinux context. Empty string is string as well. If you remove that else branch, it will work. And that +if type(selinux_ctx) == str is not good too. You generaly never know if that string is str or unicode. So checking for type of string is better to be done like: if isinstance(selinux_ctx, basestring): but since isinstance is painfully slow, I would use in this case: if selinux_ctx is not None: The second patch seems ok. Please fix the issue I mentioned and I would be happy to commit it. Thanks your guidelines. I merged all the fixes into a unique patch which follow attached. Please let me know if some change is still needed. Thanks again. Best, mmello From: Marcelo Moreira de Mello Date: Tue, 13 Dec 2011 14:25:44 -0200 Subject: [PATCH] 765816 - Added the option --selinux-context to rhncfg-manager which allows to overwrite the SELinux context from a file --- .../rhncfg/config_management/rhncfg-manager.sgml |2 ++ .../tools/rhncfg/config_management/rhncfg_add.py | 11 ++- .../rhncfg/config_management/rpc_repository.py |7 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_management/rhncfg-manager.sgml b/client/tools/rhncfg/config_management/rhncfg-manager.sgml index 9b2a2e5..81ab536 100644 --- a/client/tools/rhncfg/config_management/rhncfg-manager.sgml +++ b/client/tools/rhncfg/config_management/rhncfg-manager.sgml @@ -96,6 +96,7 @@ -tTOPDIR, --topdir=TOPDIR -- make all files relative to this string --delim-start=DELIM_START -- start delimiter for variable interpolation --delim-end=DELIM_END -- end delimiter for variable interpolation +--selinux-context=SELINUX_CONTEXT -- overwrite the SELinux context label to this string @@ -209,6 +210,7 @@ -tTOPDIR, --topdir=TOPDIR -- make all files relative to this string --delim-start=DELIM_START -- start delimiter for variable interpolation --delim-end=DELIM_END -- end delimiter for variable interpolation +--selinux-context=SELINUX_CONTEXT -- overwrite the SELinux context label to this string diff --git a/client/tools/rhncfg/config_management/rhncfg_add.py b/client/tools/rhncfg/config_management/rhncfg_add.py index b88fbc1..c6f24f9 100644 --- a/client/tools/rhncfg/config_management/rhncfg_add.py +++ b/client/tools/rhncfg/config_management/rhncfg_add.py @@ -48,6 +48,10 @@ class Handler(handler_base.HandlerBase): '-i', '--ignore-missing', action="store_true", help="Ignore missing local files", ), +handler_base.HandlerBase._option_class( +'--selinux-context', action="store_true", + help="Overwrite the SELinux context", + ), ] def run(self): @@ -110,13 +114,18 @@ class Handler(handler_base.HandlerBase): delim_start = self.options.delim_start delim_end = self.options.delim_end + +selinux_ctx = None +if type(self.options.selinux_context) != None: +selinux_ctx = self.options.selinux_context for (local_file, remote_file) in files_to_push: try: r.put_file(channel, remote_file, local_file, is_first_revision=self.is_first_revision, delim_start=delim_start, -delim_end=delim_end) +delim_end=delim_end, +selinux_ctx=selinux_ctx) except cfg_exceptions.RepositoryFileExistsError, e: log_error("Error: %s is already in channel %s" % (remote_file, channel)) diff --git a/client/tools/rhncfg/config_management/rpc_repository.py b/client/tools/rhncfg/config_management/rpc_repository.py index 2206db1..4046deb 100644 --- a/client/tools/rhncfg/config_management/rpc_repository.py +++ b/client/tools/rhncfg/config_management/rpc_repository.py @@ -135,7 +135,7 @@ class Repository(repository.RPC_Repository): def put_file(self, config_channel, repopath, localfile=None, is_first_revision=None, old_revision=None, delim_start=None, -delim_end=None): +delim_end=None, selinux_ctx=None): """ Insert a given file into the repo, overwriting if necessary. localfile defaults to the repopath @@
Re: [Spacewalk-devel] SysV to Systemd
On 12/06/2011 01:52 PM, Miroslav Suchy wrote: FYI: http://fedoraproject.org/wiki/Features/SysVtoSystemd We will need to migrate from SysV init scripts to Systemd to support Fedora 17. This is still 5 months ahead, but if somebody is boring, then you can grab this task. :) Mirek ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel Hello Mirek, I'm working on this. I'll send a mail when it be ready. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#765816 - Add an option into rhncfg-manager to allow file/directory to be uploaded without setting a SELinux context
Hello team, Follow attached 2 patches which introduces to rhncfg-manager a new functionality to allow a file to be uploaded to Spacewalk server overwriting the SELinux context at command line. The second patch adds the option into the rhncfg-manager man page. Best Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 12 Dec 2011 15:53:23 -0200 Subject: [PATCH 1/2] 765816 - Added the option --selinux-context to rhncfg-manager which allows to overwrite the SELinux context from a file --- .../tools/rhncfg/config_management/rhncfg_add.py | 13 - .../rhncfg/config_management/rpc_repository.py |7 ++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_management/rhncfg_add.py b/client/tools/rhncfg/config_management/rhncfg_add.py index b88fbc1..ec68a86 100644 --- a/client/tools/rhncfg/config_management/rhncfg_add.py +++ b/client/tools/rhncfg/config_management/rhncfg_add.py @@ -48,6 +48,10 @@ class Handler(handler_base.HandlerBase): '-i', '--ignore-missing', action="store_true", help="Ignore missing local files", ), +handler_base.HandlerBase._option_class( +'--selinux-context', action="store_true", + help="Overwrite the SELinux context", + ), ] def run(self): @@ -110,13 +114,20 @@ class Handler(handler_base.HandlerBase): delim_start = self.options.delim_start delim_end = self.options.delim_end + +selinux_ctx = None +if type(self.options.selinux_context) != None: +selinux_ctx = self.options.selinux_context +else: +selinux_ctx = '' for (local_file, remote_file) in files_to_push: try: r.put_file(channel, remote_file, local_file, is_first_revision=self.is_first_revision, delim_start=delim_start, -delim_end=delim_end) +delim_end=delim_end, +selinux_ctx=selinux_ctx) except cfg_exceptions.RepositoryFileExistsError, e: log_error("Error: %s is already in channel %s" % (remote_file, channel)) diff --git a/client/tools/rhncfg/config_management/rpc_repository.py b/client/tools/rhncfg/config_management/rpc_repository.py index 2206db1..907ff89 100644 --- a/client/tools/rhncfg/config_management/rpc_repository.py +++ b/client/tools/rhncfg/config_management/rpc_repository.py @@ -135,7 +135,7 @@ class Repository(repository.RPC_Repository): def put_file(self, config_channel, repopath, localfile=None, is_first_revision=None, old_revision=None, delim_start=None, -delim_end=None): +delim_end=None, selinux_ctx=None): """ Insert a given file into the repo, overwriting if necessary. localfile defaults to the repopath @@ -151,6 +151,11 @@ class Repository(repository.RPC_Repository): error_msg = "%s too large (%s bytes, %s bytes max allowed)" raise cfg_exceptions.ConfigFileTooLargeError(error_msg % (localfile, params['size'], max_file_size)) +if type(selinux_ctx) == str: +params.update({ +'selinux_ctx' : selinux_ctx, +)} + params.update({ 'session' : self.session, 'config_channel': config_channel, -- 1.7.7.4 From: Marcelo Moreira de Mello Date: Mon, 12 Dec 2011 16:05:26 -0200 Subject: [PATCH 2/2] 765816 - Added to the rhncfg-manager man page the option --selinux-context --- .../rhncfg/config_management/rhncfg-manager.sgml |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/client/tools/rhncfg/config_management/rhncfg-manager.sgml b/client/tools/rhncfg/config_management/rhncfg-manager.sgml index 9b2a2e5..125ab21 100644 --- a/client/tools/rhncfg/config_management/rhncfg-manager.sgml +++ b/client/tools/rhncfg/config_management/rhncfg-manager.sgml @@ -96,6 +96,7 @@ -tTOPDIR, --topdir=TOPDIR -- make all files relative to this string --delim-start=DELIM_START -- start delimiter for variable interpolation --delim-end=DELIM_END -- end delimiter for variable interpolation +--selinux-context=SELINUX_CONTEXT -- overwrite the SELinux context label to this string @@ -209,6 +210,7 @@ -tTOPDIR, --topdir=TOPDIR -- make all files relative to this string
Re: [Spacewalk-devel] [PATCH] - 753021 spacewalk-repo-sync updates last_modified even if no new packages to download
On 21/11/2011, at 12:52, Jan Pazdziora wrote: > Comment in bugzilla -- I nack this patch. > > -- > Jan Pazdziora > Principal Software Engineer, Satellite Engineering, Red Hat Hello Jan, I added some notes in bugzilla. Thank you. Best, mmello ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 627490 - rhncfg-client handles symlinks to directories wrong
On 11/21/2011 11:22 AM, Michael Mraka wrote: > Marcelo Moreira de Mello wrote: > % Hello Michael, > % > % I'm running rhncfg-client-5.10.19-1.el5. Note that the /var is a > % partition. Look further details: > > Hello Marcelo, > > this is pretty important information. It's exactly what I had on my > mind when I asked what issue not covered by the current fix... > > OK, now I can actually see the problem and reproduce it. > I've applied your patch. > > Thanks, > > -- > Michael Mráka > Satellite Engineering, Red Hat > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel Thank you Michael. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 627490 - rhncfg-client handles symlinks to directories wrong
On 18/11/2011, at 13:55, Michael Mraka wrote: > # rhncfg-client get /teste > Using server name test04-64 > Deploying /teste > > It works for me even for the second, third, etc. time. > > # rpm -q rhncfg-client > rhncfg-client-5.10.18-1.el5.noarch > > What's version of your rhncfg-client? > > Regards, > > -- > Michael Mráka > Satellite Engineering, Red Hat Hello Michael, I'm running rhncfg-client-5.10.19-1.el5. Note that the /var is a partition. Look further details: # df -h Sist. Arq.Tam Usad Disp Uso% Montado em /dev/mapper/myvg-rootvol 6,7G 1,2G 5,2G 19% / /dev/mapper/myvg-varvol 3,8G 165M 3,5G 5% /var /dev/hda1 190M 20M 161M 11% /boot # rpm -aq | grep rhncfg rhncfg-management-5.10.19-1.el5 rhncfg-5.10.19-1.el5 rhncfg-actions-5.10.19-1.el5 rhncfg-client-5.10.19-1.el5 # rhncfg-client verify Using server name server.example.com missing /boot/cross-dir missing /boot/cross-link missing /etc/test-file-regular missing /root/sym-link-same-part missing /teste # ls -lad /teste /boot/cross-dir /boot/cross-link /etc/test-file-regular /root/sym-link-same-part ls: /teste: Arquivo ou diretório não encontrado ls: /boot/cross-dir: Arquivo ou diretório não encontrado ls: /boot/cross-link: Arquivo ou diretório não encontrado ls: /etc/test-file-regular: Arquivo ou diretório não encontrado ls: /root/sym-link-same-part: Arquivo ou diretório não encontrado # rhncfg-client get Using server name server.example.com Deploying /etc/test-file-regular Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir # ls -lad /teste /boot/cross-dir /boot/cross-link /etc/test-file-regular /root/sym-link-same-part lrwxrwxrwx 1 root root 14 Nov 18 19:19 /boot/cross-dir -> /usr/local/bin lrwxrwxrwx 1 root root 11 Nov 18 19:19 /boot/cross-link -> /etc/passwd -rw-r--r-- 1 root root 15 Nov 18 19:19 /etc/test-file-regular lrwxrwxrwx 1 root root 10 Nov 18 19:19 /root/sym-link-same-part -> /etc/hosts lrwxrwxrwx 1 root root 4 Nov 18 19:19 /teste -> /tmp --> Re-deployment fails # rhncfg-client get Using server name server.example.com Deploy failed, rollback successful Looking the logs: 2011-11-18 19:22:08 transactions.deploy: deploying transaction 2011-11-18 19:22:08 transactions.deploy: changed_dir_info: {} 2011-11-18 19:22:08 transactions.deploy: new_dirs: [] 2011-11-18 19:22:08 transactions.deploy: done with directory creation, moving on to files 2011-11-18 19:22:08 transactions._rename_to_backup: renaming /etc/test-file-regular to backup /var/lib/rhncfg/backups/etc/test-file-regular.rhn-cfg-backup ... 2011-11-18 19:22:08 transactions._rename_to_backup: trying to use os.renames 2011-11-18 19:22:08 transactions._rename_to_backup: os.renames failed, using shutil functions 2011-11-18 19:22:08 transactions._rename_to_backup: backup directory /var/lib/rhncfg/backups/etc exists, copying test-file-regular.rhn-cfg-backup to it 2011-11-18 19:22:08 transactions._rename_to_backup: backed up to /var/lib/rhncfg/backups/etc/test-file-regular.rhn-cfg-backup 2011-11-18 19:22:08 transactions.deploy: backup file /var/lib/rhncfg/backups/etc/test-file-regular.rhn-cfg-backup written 2011-11-18 19:22:08 transactions._rename_to_backup: renaming /boot/cross-link to backup /var/lib/rhncfg/backups/boot/cross-link.rhn-cfg-backup ... 2011-11-18 19:22:08 transactions._rename_to_backup: trying to use os.renames 2011-11-18 19:22:08 transactions._rename_to_backup: os.renames failed, using shutil functions 2011-11-18 19:22:08 transactions._rename_to_backup: backup directory /var/lib/rhncfg/backups/boot exists, copying cross-link.rhn-cfg-backup to it 2011-11-18 19:22:08 transactions.rollback: rolling back 2011-11-18 19:22:08 transactions.rollback: restoring /etc/test-file-regular from /var/lib/rhncfg/backups/etc/test-file-regular.rhn-cfg-backup ... 2011-11-18 19:22:08 transactions.rollback: os.rename failed, using shutil.copy 2011-11-18 19:22:08 transactions.rollback: /etc/test-file-regular restored 2011-11-18 19:22:08 transactions.rollback: removing tmp file //etc/.rhn-cfg-tmp-12883-cfx-c3 ... 2011-11-18 19:22:08 transactions.rollback: tmp file removed 2011-11-18 19:22:08 transactions.rollback: removing tmp file //boot/.rhn-cfg-tmp-12883-bkBnag ... 2011-11-18 19:22:08 transactions.rollback: tmp file removed 2011-11-18 19:22:08 transactions.rollback: removing tmp file //root/.rhn-cfg-tmp-12883-lZAJSl ... 2011-11-18 19:22:08 transactions.rollback: tmp file removed 2011-11-18 19:22:08 transactions.rollback: removing tmp file //.rhn-cfg-tmp-12883-z7PWDY ... 2011-11-18 19:22:08 transactions.rollback: tmp file removed 2011-11-18 19:22:08 transactions.rollback: removing tmp file //boot/.rhn-cfg-tmp-12883-gbmlLs ... 2011-11-18 19:22:08 transactions.rollback: tmp file removed 2011-11-18 19:22:08 transactions.rollback: rollback successful Deploy failed, rollback successful ---> Applying the patch
Re: [Spacewalk-devel] [PATCH] - 627490 - rhncfg-client handles symlinks to directories wrong
On 18/11/2011, at 13:14, Michael Mraka wrote: > Marcelo Moreira de Mello wrote: > % Basically the problem happens when you have a configuration channel > % which provides a directory as a symlink, the rhncfg-client get > > A directory as a symlink - do you mean a link that points to a directory? Correct. > > % command works for the first time. When trying to redeploy the files > % again, rhncfg-client get fails and rollback the files since since > % shutil.copy() fails to overwrite the existing symlink directory. The > % issue does not happen when the symlink is a file. > > This issue has been already addressed (by commit > 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f as stated in the bugzilla). > Is there a case where it doesn't work? What issue not covered by the > current fix does the new patch solve? Even having the commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f applied, the issue is not totally covered. Look below: # grep "if os.path.isdir(path) and not os.path.islink(path):" /usr/share/rhn/config_common/transactions.py -A10 -B10 for dep_file in self.files: path = dep_file['path'] log_debug(6, "writing new version of %s to tmp file ..." % path) # make any directories needed... # # TODO: it'd be nice if this had a hook for letting me know # which ones are created... then i could clean created # dirs on rollback (directory, filename) = os.path.split(path) if os.path.isdir(path) and not os.path.islink(path): raise cfg_exceptions.FileEntryIsDirectory(path) if not os.path.exists(directory) and os.path.isdir(directory): log_debug(7, "creating directories for %s ..." % directory) dirs_created = utils.mkdir_p(directory) self.new_dirs.extend(dirs_created) log_debug(7, "directories created and added to list for rollback") # write the new contents to a tmp file, and store the path of the # new tmp file by it's eventual target path self.newtemp_by_path[path], temp_new_dirs = fp.process(dep_file, os.path.sep) # rhncfg-client elist Mode Owner Group Size Rev Config ChannelFile lrwxrwxrwx root root 14 1 teste /boot/cross-dir -> /usr/local/bin lrwxrwxrwx root root 11 2 teste /boot/cross-link -> /etc/passwd -rw-r--r-- root root 15 1teste /etc/test-file-regular lrwxrwxrwx root root 10 2 teste /root/sym-link-same-part -> /etc/hosts lrwxrwxrwx root root 4 1teste/teste -> /tmp # rhncfg-client get /teste Deploying /teste # ls -lah /teste lrwxrwxrwx 1 root root 4 Nov 18 13:26 /teste -> /tmp # rhncfg-client get /teste Deploy failed, rollback successful After applying the patch proposed, the re-deploymented worked as expected # rm -f /teste ; rhncfg-client get /teste ; ls -la /teste ; rhncfg-client get /teste ; ls -la /teste Deploying /teste lrwxrwxrwx 1 root root 4 Nov 18 13:28 /teste -> /tmp Deploying /teste lrwxrwxrwx 1 root root 4 Nov 18 13:29 /teste -> /tmp Thanks Michael. Best, mmello > > Regards, > > > -- > Michael Mráka > Satellite Engineering, Red Hat > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 627490 - rhncfg-client handles symlinks to directories wrong
On 18/11/2011, at 08:50, Michael Mraka wrote: > Hello Marcello, > > I'm confused by this patch... what's the problem it should solve? > > Regads, > > -- > Michael Mráka > Satellite Engineering, Red Hat Hello Michael, Basically the problem happens when you have a configuration channel which provides a directory as a symlink, the rhncfg-client get command works for the first time. When trying to redeploy the files again, rhncfg-client get fails and rollback the files since since shutil.copy() fails to overwrite the existing symlink directory. The issue does not happen when the symlink is a file. --> Files provided root@dhcp235 ~]# rhncfg-client elist Mode Owner Group Size Rev Config ChannelFile lrwxrwxrwx root root 14 1 teste /boot/cross-dir -> /usr/local/bin lrwxrwxrwx root root 11 2 teste /boot/cross-link -> /etc/passwd lrwxrwxrwx root root 10 2 teste /root/sym-link-same-part -> /etc/hosts lrwxrwxrwx root root 4 1teste/teste -> /tmp ---> Checking files [root@dhcp235 ~]# rhncfg-client verify missing /boot/cross-dir missing /boot/cross-link missing /root/sym-link-same-part missing /teste ---> Deploying files [root@dhcp235 ~]# rhncfg-client get Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir ---> Checking files: All files were deployed as expected [root@dhcp235 ~]# rhncfg-client verify /boot/cross-dir /boot/cross-link /root/sym-link-same-part /teste --> Symlink directory were deployed as expected [root@dhcp235 ~]# ls -lad /teste lrwxrwxrwx 1 root root 4 Nov 14 12:37 /teste -> /tmp > Re-deployment failed [root@dhcp235 ~]# rhncfg-client get Deploy failed, rollback successful Basically we followed the steps below to debug the issue: Looking the code: try: log_debug(9, "trying to use os.renames") oumask = os.umask(022) os.renames(path, new_path) os.umask(oumask) except OSError, e: if e.errno == 18: log_debug(9, "os.renames failed, using shutil functions") path_dir, path_file = os.path.split(path) log_debug(9, "mmello --> path_dir --> %s path_file --> %s" % (path_dir,path_file)) new_path_dir, new_path_file = os.path.split(new_path) log_debug(9, "mmello --> new_path_dir --> %s new_path_file --> %s" % (new_path_dir, new_path_file)) if os.path.isdir(new_path_dir): log_debug(9, "backup directory %s exists, copying %s to it" % (new_path_dir, new_path_file)) log_debug(9, "mmello -> trying to copy %s to %s" % (path,new_path)) shutil.copy(path, new_path) else: log_debug(9, "backup directory does not exist, creating the tree now") shutil.copytree(path_dir, new_path_dir, symlinks=0) shutil.copy(path, new_path) else: raise self.backup_by_path[path] = new_path log_debug(9, "backed up to %s" % new_path) else: raise TargetNotFile("Error: %s is not a valid file, cannot create backup copy" % path) return new_path Looking the logs: # rhncfg-client get { … SNIP … } 2011-11-14 13:20:36 transactions._rename_to_backup: renaming /teste to backup /var/lib/rhncfg/backups/teste.rhn-cfg-backup ... 2011-11-14 13:20:36 transactions._rename_to_backup: trying to use os.renames 2011-11-14 13:20:36 transactions._rename_to_backup: os.renames failed, using shutil functions 2011-11-14 13:20:36 transactions._rename_to_backup: mmello --> path_dir --> / path_file --> teste 2011-11-14 13:20:36 transactions._rename_to_backup: mmello --> new_path_dir --> /var/lib/rhncfg/backups new_path_file --> teste.rhn-cfg-backup 2011-11-14 13:20:36 transactions._rename_to_backup: backup directory /var/lib/rhncfg/backups exists, copying teste.rhn-cfg-backup to it 2011-11-14 13:20:36 transactions._rename_to_backup: mmello -> trying to copy /teste to /var/lib/rhncfg/backups/teste.rhn-cfg-backup 2011-11-14 13:20:36 transactions.rollback: rolling back Running manually: [root@dhcp235 backups]# python Python 2.4.3 (#1, Aug 29 2011, 10:55:55) [GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shutil >>> shutil.copy("/teste","/var/lib/rhncfg/backups/teste.rhn-cfg-backup") Traceback (most recent call last): File "", line 1, in ? File "/usr/lib64/python2.4/shutil.py", line 81, in copy copyfile(src, dst) File "/usr/lib64/
[Spacewalk-devel] [PATCH] - 627490 - rhncfg-client handles symlinks to directories wrong
Hello team, Here follow an complementary patch for commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f when handling directory symlinks. After applying the patch: #rhncfg-client elist Mode Owner Group Size Rev Config ChannelFile lrwxrwxrwx root root 14 1 teste /boot/cross-dir -> /usr/local/bin lrwxrwxrwx root root 11 2 teste /boot/cross-link -> /etc/passwd -rw-r--r-- root root 15 1 teste /etc/test-file-regular lrwxrwxrwx root root 10 2 teste /root/sym-link-same-part -> /etc/hosts lrwxrwxrwx root root 4 1 teste /teste -> /tmp #rhncfg-client verify missing /boot/cross-dir missing /boot/cross-link missing /etc/test-file-regular missing /root/sym-link-same-part missing /teste #rhncfg-client get Deploying /etc/test-file-regular Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir #rhncfg-client verify /boot/cross-dir /boot/cross-link /etc/test-file-regular /root/sym-link-same-part /teste #ls -lad /teste /boot/cross-dir lrwxrwxrwx 1 root root 14 Nov 14 16:40 /boot/cross-dir -> /usr/local/bin lrwxrwxrwx 1 root root 4 Nov 14 16:40 /teste -> /tmp #rhncfg-client get Deploying /etc/test-file-regular Deploying /boot/cross-link Deploying /root/sym-link-same-part Deploying /teste Deploying /boot/cross-dir #ls -lad /teste /boot/cross-dir lrwxrwxrwx 1 root root 14 Nov 14 16:41 /boot/cross-dir -> /usr/local/bin lrwxrwxrwx 1 root root 4 Nov 14 16:41 /teste -> /tmp #tree /var/lib/rhncfg/backups/ /var/lib/rhncfg/backups/ |-- boot | |-- cross-dir.rhn-cfg-backup -> /usr/local/bin | `-- cross-link.rhn-cfg-backup -> /etc/passwd |-- etc | `-- test-file-regular.rhn-cfg-backup |-- root | `-- sym-link-same-part.rhn-cfg-backup -> /etc/hosts `-- teste.rhn-cfg-backup -> /tmp 5 directories, 3 files Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 14 Nov 2011 16:32:00 -0200 Subject: [PATCH] 627490 - rhncfg-client handles symlinks to directories wrong Complementary patch for commit 06a1f13b03f569c6a251e5fbe45069e6b8bb0c9f lrwxrwxrwx 1 root root 4 Nov 14 16:33 /teste -> /tmp 2011-11-14 16:33:06 rpc_cli_repository.list_files: 2011-11-14 16:33:06 rpc_cli_repository.get_file_info: /teste 2011-11-14 16:33:06 transactions.add_preprocessed: preprocessing entry 2011-11-14 16:33:06 transactions.deploy: deploying transaction 2011-11-14 16:33:06 transactions.deploy: changed_dir_info: {} 2011-11-14 16:33:06 transactions.deploy: new_dirs: [] 2011-11-14 16:33:06 transactions.deploy: done with directory creation, moving on to files 2011-11-14 16:33:06 transactions._rename_to_backup: renaming /teste to backup /var/lib/rhncfg/backups/teste.rhn-cfg-backup ... 2011-11-14 16:33:06 transactions._rename_to_backup: trying to use os.renames 2011-11-14 16:33:06 transactions._rename_to_backup: os.renames failed, using shutil functions 2011-11-14 16:33:06 transactions._rename_to_backup: copying symlink /teste to /var/lib/rhncfg/backups 2011-11-14 16:33:06 transactions._rename_to_backup: symlink /teste exists, removing it 2011-11-14 16:33:06 transactions._rename_to_backup: backed up to /var/lib/rhncfg/backups/teste.rhn-cfg-backup 2011-11-14 16:33:06 transactions.deploy: backup file /var/lib/rhncfg/backups/teste.rhn-cfg-backup written Deploying /teste 2011-11-14 16:33:06 transactions.deploy: deploying /teste ... 2011-11-14 16:33:06 transactions.deploy: new version of /teste deployed 2011-11-14 16:33:06 transactions.deploy: deploy transaction successful 2011-11-14 16:33:06 rpc_cli_repository.cleanup: --- client/tools/rhncfg/config_common/transactions.py | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py index 0a90ba0..db778df 100644 --- a/client/tools/rhncfg/config_common/transactions.py +++ b/client/tools/rhncfg/config_common/transactions.py @@ -89,8 +89,16 @@ class DeployTransaction: path_dir, path_file = os.path.split(path) new_path_dir, new_path_file = os.path.split(new_path) if os.path.isdir(new_path_dir): - log_debug(9, "backup directory %s exists, copying %s to it" % (new_path_dir, new_path_file)) - shutil.copy(path, new_path) + if os.path.islink(path): + log_debug(9, "copying symlink %s to %s"% (path,new_path_dir)) + linkto = os.readl
[Spacewalk-devel] [PATCH] - 753021 spacewalk-repo-sync updates last_modified even if no new packages to download
Hello team, I'm not very knowledgeable on trigger writing, but follow attached a patch which fixes the trigger rhn_channel_mod_trig updating the field last_modified only when some new package or change are made into channel. Please, check the complete error description and tests at BZ#753021. Thank you. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Fri, 11 Nov 2011 14:52:46 -0200 Subject: [PATCH] 753021 - fixed spacewalk-repo-sync updates last_modified even if no new packages to download --- schema/spacewalk/oracle/triggers/rhnChannel.sql |4 +++- schema/spacewalk/postgres/triggers/rhnChannel.sql |6 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/schema/spacewalk/oracle/triggers/rhnChannel.sql b/schema/spacewalk/oracle/triggers/rhnChannel.sql index 3a357fa..58ef396 100644 --- a/schema/spacewalk/oracle/triggers/rhnChannel.sql +++ b/schema/spacewalk/oracle/triggers/rhnChannel.sql @@ -21,7 +21,9 @@ rhn_channel_mod_trig before insert or update on rhnChannel for each row begin - :new.last_modified := sysdate; +if inserting then + :new.last_modified := sysdate; +end if; -- this is a really bad way of saying "if all we''re -- changing is the date" if updating then diff --git a/schema/spacewalk/postgres/triggers/rhnChannel.sql b/schema/spacewalk/postgres/triggers/rhnChannel.sql index 4dfe71d..864a1f0 100644 --- a/schema/spacewalk/postgres/triggers/rhnChannel.sql +++ b/schema/spacewalk/postgres/triggers/rhnChannel.sql @@ -21,9 +21,11 @@ create or replace function rhn_channel_mod_trig_fun() returns trigger as $$ begin - new.last_modified := current_timestamp; +if tg_op='INSERT' then + new.last_modified := current_timestamp; +end if; -- this is a really bad way of saying "if all we''re --- changing is the date" +-- changing is the date" if tg_op='UPDATE' then if (old.id is distinct from new.id) or (old.parent_channel is distinct from new.parent_channel) or -- 1.7.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Is Spacewalk still being tracked by Ohloh?
Hello guys, Is Spacewalk still being trackbed by Ohloh? http://www.ohloh.net/p/spacewalk The latest commit were tracked in on 2011-08-19. Thanks. mmello___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - #743407 and #741476 - system.getDmi()
conds [2011-10-06 19:39:09,185] INFO - REQUESTED FROM: *callerIp* CALL: system.getDmi(118036x129f9fc11c63458eb3f08b3b73fc0199, 11) CALLER: (mmello) TIME: 0.029 seconds [2011-10-06 19:39:09,423] INFO - REQUESTED FROM: *callerIp* CALL: system.getDmi(118036x129f9fc11c63458eb3f08b3b73fc0199, 110003) CALLER: (mmello) TIME: 0.033 seconds [2011-10-06 19:39:09,640] INFO - REQUESTED FROM: *callerIp* CALL: auth.logout(118036x129f9fc11c63458eb3f08b3b73fc0199) CALLER: (mmello) TIME: 0.0080 seconds stheo $> python api-dmi.py { SNIP } 1000010000 {'product': 'SUN BLADE X6240 SERVER MODULE', 'vendor': 'SUN MICROSYSTEMS', 'bios_vendor': 'American Megatrends Inc.', 'system': 'SUN BLADE X6240 SERVER MODULE 0.00.01', 'bios_release': '06/05/2009', 'board': 'SUN MICROSYSTEMS', 'bios_version': '1.17', 'asset': '(chassis: 00) (chassis: Null) (board: 0328MSL-081450009E) (system: 00)'} 110003 {'product': '', 'vendor': '', 'bios_vendor': '', 'system': '', 'bios_release': '', 'board': '', 'bios_version': '', 'asset': ''} As we can see the patch above addressed the issue related with the BIOS component and also does not provide an regression regarding the bug 452956. Thank you in advance. Best Regards, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG From: Marcelo Moreira de Mello Date: Thu, 6 Oct 2011 19:51:02 -0300 Subject: [PATCH 1/2] 741476 - fixed system.getDmi() method does not return data when SYSTEM field at RHNSERVERDMI table is null --- .../frontend/xmlrpc/serializer/DmiSerializer.java |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java index 7fb29ad..9f5b712 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java @@ -59,10 +59,6 @@ public class DmiSerializer implements XmlRpcCustomSerializer { SerializerHelper bean = new SerializerHelper(builtInSerializer); Dmi dmi = (Dmi) value; -if (dmi.getSystem() == null) { -return; -} - bean.add("vendor", StringUtils.defaultString(dmi.getVendor())); bean.add("system", StringUtils.defaultString(dmi.getSystem())); bean.add("product", StringUtils.defaultString(dmi.getProduct())); -- 1.7.6.4 From: Marcelo Moreira de Mello Date: Thu, 6 Oct 2011 20:08:10 -0300 Subject: [PATCH 2/2] 743407 - API system.getDmi() returns a traceback when BIOS field is null into database Traceback (most recent call last): File "api-dmi.py", line 12, in sys_dmi = server.system.getDmi(token,int(system['id'])) File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response p.feed(data) File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 76 --- .../frontend/xmlrpc/serializer/DmiSerializer.java | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java index 9f5b712..5f5ebc1 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java @@ -16,6 +16,7 @@ package com.redhat.rhn.frontend.xmlrpc.serializer; import com.redhat.rhn.domain.server.Dmi; +import com.redhat.rhn.domain.server.Dmi.Bios; import com.redhat.rhn.frontend.xmlrpc.serializer.util.SerializerHelper; import org.apache.commons.lang.StringUtils; @@ -58,15 +59,22 @@ public class DmiSerializer implements XmlRpcCustomSerializer { throws XmlRpcException, IOException {
Re: [Spacewalk-devel] [PATCH] - 743407 API system.getDmi() method does not return data when BIOS_VERSION field at RHNSERVERDMI table is null
Hello, Follow the patch which fixes the python traceback exception when the when the fields BIOS_VENDOR and BIOS_RELEASE and BIOS_VERSION are blank into database. The patch call the Class constructor if the object is null. Created a test package and worked as expected. Traceback (most recent call last): File "api-dmi.py", line 12, in sys_dmi = server.system.getDmi(token,int(system['id'])) File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response p.feed(data) File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 76 Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG From: Marcelo Moreira de Mello Date: Wed, 5 Oct 2011 17:07:37 -0300 Subject: [PATCH] 743407 fixed the traceback from API call system.getDMI() when the fields BIOS_VENDOR and BIOS_RELEASE and BIOS_VERSION are blank into database Traceback: - Traceback (most recent call last): File "api-dmi.py", line 12, in sys_dmi = server.system.getDmi(token,int(system['id'])) File "/usr/lib64/python2.7/xmlrpclib.py", line 1224, in __call__ return self.__send(self.__name, args) File "/usr/lib64/python2.7/xmlrpclib.py", line 1570, in __request verbose=self.__verbose File "/usr/lib64/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib64/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/lib64/python2.7/xmlrpclib.py", line 1462, in parse_response p.feed(data) File "/usr/lib64/python2.7/xmlrpclib.py", line 557, in feed self._parser.Parse(data, 0) xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 1, column 76 .../code/src/com/redhat/rhn/domain/server/Dmi.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/domain/server/Dmi.java b/java/code/src/com/redhat/rhn/domain/server/Dmi.java index 45835bd..544eac7 100644 --- a/java/code/src/com/redhat/rhn/domain/server/Dmi.java +++ b/java/code/src/com/redhat/rhn/domain/server/Dmi.java @@ -59,7 +59,7 @@ public class Dmi extends BaseDomainHelper { * @return Returns the bios. */ public Bios getBios() { -return bios; +return bios!=null?bios:new Bios(); } /** -- 1.7.6.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 741476 API system.getDmi() method does not return data when SYSTEM field at RHNSERVERDMI table is null
On 10/05/2011 04:03 AM, Jan Pazdziora wrote: > Nack. > > The first part of your patch reverts change for bug 452956. Unless we > know *exactly* why that change was done for that bug (in other words, > reproduce that original bug, without that patch), we risk a regression > here. > > The second part of your patch seems like a noop to me since > StringUtils.defaultString is defined as > > Returns either the passed in String, or if the String is null, > an empty String (""). > > already. Hello, After reviewing the patch follow attach a better looking patch for this bug. Doing our tests, this patch does not include a regression for bug 452956. I created a test package and the API worked as expected. Best, mmello -- Marcelo Moreira de Mello From: Marcelo Moreira de Mello Date: Wed, 5 Oct 2011 16:58:41 -0300 Subject: [PATCH] 741476 - fixed API system.getDmi() method to no abort the operation when system is NULL --- .../frontend/xmlrpc/serializer/DmiSerializer.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java index 7fb29ad..1710c2d 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java @@ -60,7 +60,7 @@ public class DmiSerializer implements XmlRpcCustomSerializer { Dmi dmi = (Dmi) value; if (dmi.getSystem() == null) { -return; +dmi.setSystem(""); } bean.add("vendor", StringUtils.defaultString(dmi.getVendor())); -- 1.7.6.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 743407 API system.getDmi() method does not return data when BIOS_VERSION field at RHNSERVERDMI table is null
Hello guys, Please, await to review this patch before commit. I'm making further tests into this. Sorry for noisy. Working into this. Best, mmello Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer - SEG gpg id: 2048/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 On Oct 4, 2011, at 7:16 PM, Marcelo Moreira de Mello wrote: > Howdy team, > > Follow other patch which includes a fix when BIOS object is null/blank > into database. Created a test package and worked as expected. > > Best, > mmello > > -- > Marcelo Moreira de Mello > RHCA RHCSS RHCVA > Senior Software Maintenance Engineer/SEG > > gpg id: 2048R/FDB110E5 > gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 > > <0001-743407-fixed-API-system.getDmi-method-does-not-retur.patch>___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - 741476 API system.getDmi() method does not return data when SYSTEM field at RHNSERVERDMI table is null
Hello Jan, Reviewing it.. Hope to provide an update into this ASAP. Thank you for heads up. Working into this. Best, mmello Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer - SEG gpg id: 2048/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 On Oct 5, 2011, at 4:03 AM, Jan Pazdziora wrote: > On Tue, Oct 04, 2011 at 07:13:31PM -0300, Marcelo Moreira de Mello wrote: >> Hello Team, >> >> Follow a patch addressed to BZ at $subject. Created an test package >> and worked as expected. >> >> After applied the patch, the results work as expected. > > Nack. > > The first part of your patch reverts change for bug 452956. Unless we > know *exactly* why that change was done for that bug (in other words, > reproduce that original bug, without that patch), we risk a regression > here. > > The second part of your patch seems like a noop to me since > StringUtils.defaultString is defined as > > Returns either the passed in String, or if the String is null, > an empty String (""). > > already. > > -- > Jan Pazdziora > Principal Software Engineer, Satellite Engineering, Red Hat > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 743407 API system.getDmi() method does not return data when BIOS_VERSION field at RHNSERVERDMI table is null
Howdy team, Follow other patch which includes a fix when BIOS object is null/blank into database. Created a test package and worked as expected. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 >From a86ad097b591d7cf095aa583ac7df9260c246374 Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Tue, 4 Oct 2011 18:39:02 -0300 Subject: [PATCH] 743407 - fixed API system.getDmi() method does not return data when BIOS_VERSION field at RHNSERVERDMI table is null --- .../code/src/com/redhat/rhn/domain/server/Dmi.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/domain/server/Dmi.java b/java/code/src/com/redhat/rhn/domain/server/Dmi.java index 45835bd..544eac7 100644 --- a/java/code/src/com/redhat/rhn/domain/server/Dmi.java +++ b/java/code/src/com/redhat/rhn/domain/server/Dmi.java @@ -59,7 +59,7 @@ public class Dmi extends BaseDomainHelper { * @return Returns the bios. */ public Bios getBios() { -return bios; +return bios!=null?bios:new Bios(); } /** -- 1.7.6.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 741476 API system.getDmi() method does not return data when SYSTEM field at RHNSERVERDMI table is null
Hello Team, Follow a patch addressed to BZ at $subject. Created an test package and worked as expected. After applied the patch, the results work as expected. Best, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 4 Oct 2011 18:36:16 -0300 Subject: [PATCH] 741476 - fixed API system.getDmi() method does not return data when SYSTEM field at RHNSERVERDMI table is null --- .../frontend/xmlrpc/serializer/DmiSerializer.java | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java index 7fb29ad..dcd94a6 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/serializer/DmiSerializer.java @@ -59,15 +59,11 @@ public class DmiSerializer implements XmlRpcCustomSerializer { SerializerHelper bean = new SerializerHelper(builtInSerializer); Dmi dmi = (Dmi) value; -if (dmi.getSystem() == null) { -return; -} - -bean.add("vendor", StringUtils.defaultString(dmi.getVendor())); -bean.add("system", StringUtils.defaultString(dmi.getSystem())); -bean.add("product", StringUtils.defaultString(dmi.getProduct())); -bean.add("asset", StringUtils.defaultString(dmi.getAsset())); -bean.add("board", StringUtils.defaultString(dmi.getBoard())); +bean.add("vendor", StringUtils.defaultString(dmi.getVendor()==null?"":dmi.getVendor())); +bean.add("system", StringUtils.defaultString(dmi.getSystem()==null?"":dmi.getSystem())); +bean.add("product", StringUtils.defaultString(dmi.getProduct()==null?"":dmi.getProduct())); +bean.add("asset", StringUtils.defaultString(dmi.getAsset()==null?"":dmi.getAsset())); +bean.add("board", StringUtils.defaultString(dmi.getBoard()==null?"":dmi.getBoard())); bean.add("bios_release", StringUtils.defaultString(dmi.getBios().getRelease())); bean.add("bios_vendor", StringUtils.defaultString(dmi.getBios().getVendor())); bean.add("bios_version", StringUtils.defaultString(dmi.getBios().getVersion())); -- 1.7.6.4 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#737697 rhn_check fails to deploy some files when the configuration channel have some other files which does not have a valid UID/GID
On Sep 22, 2011, at 2:05 PM, Jan Pazdziora wrote: > On Thu, Sep 22, 2011 at 01:02:44PM -0300, Marcelo Moreira de Mello wrote: >> >> When scheduling a config files deployment using the webUI, rhn_check fails >> if some file scheduled does not have a valid UID/GID into client box. >> > > With current unpatched code, when this happens -- are some of the > files deployed and some not, or is the whole deployment cancelled? > I am not completely sure it is correct to deploy half of the files > and not deploy the other half -- especially with the batch-oriented > processing of scheduled actions, you don't want the machine to be > left in an inconsistent state. At unpatched code, the whole deployment is cancelled. It rollbacks all the files and none files is deployed. When I started looking into this issue, I had the thinking that you. > >> This patch introduce to rhn_check the same behavior as rhncfg-client get >> allowing the correct files (which have a valid UID/GID) to be deployed and >> fails to those files which misses a valid UID/GID. >> > > I assume that rhncfg-client get complains loudly about the files it > failed to deploy. From this point of view, it is tolerable that > rhncfg-client get would only deploy half of the files because there > is likely person running that command which would be able to respond > accordingly. Yes. rhncfg-client get complains and print into the screen the files which were not able to be deployed. Although, we can see a lot of sysadmin using the rhncfg-client get at %post section in their kickstart, where they will not be able to see such warning too. In this case per example, we have a customer which expects that rhn_check works deploying half of files, but I do agree with you that in some other cases, we don't want the machine to be left in an inconsistent state. I think that we can offer to the users an option to make such behavior with a tunable parameter. Per example, we can add a new option at rhn-actions-control --enable-half-deploy or --enable-unbatch which turns rhn_check able to perform unbatched deployments. Please, check the comment https://bugzilla.redhat.com/show_bug.cgi?id=737698#c1 regarding the customer's expectations. What do you think? Appreciate your help. Best Regards, mmello > > -- > Jan Pazdziora > Principal Software Engineer, Satellite Engineering, Red Hat > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#737697 rhn_check fails to deploy some files when the configuration channel have some other files which does not have a valid UID/GID
KOjoxICAg\nICAgICAgbG9jYWxob3N0IGxvY2FsaG9zdC5sb2NhbGRvbWFpbiBsb2NhbGhvc3Q2IGxvY2FsaG9z\ndDYubG9jYWxkb21haW42CgoKIyBFT0YgZmlsZQ==\n', 'selinux_ctx': '', 'filemode': 644, 'path': '/etc/hosts', 'checksum_type': 'md5', 'revision': 1}]},) {'cache_only': None} D: Sending back response (44, 'Files successfully deployed but some files were not deployed for not having a valid uid/gid', {}) D: do_call packages.checkNeedUpdate ('rhnsd=1',) {} Loaded plugins: rhnplugin D: Called refresh_rpmlist Updating package profile D: local action status: (0, 'rpmlist refreshed', {}) # rhncfg-client verify /etc/file2 /etc/hosts missing /etc/no_such_user_file /tmp/file1 missing /tmp/no_such_user_tmp_file # ls -la /tmp/no_such_user_tmp_file /tmp/file1 /etc/no_such_user_file /etc/hosts /etc/file2 ls: /tmp/no_such_user_tmp_file: No such file or directory ls: /etc/no_such_user_file: No such file or directory -rw-r--r-- 1 root root 35 Sep 15 01:01 /etc/file2 -rw-r--r-- 1 root root 199 Sep 15 01:01 /etc/hosts -rw-r--r-- 1 root root 34 Sep 15 01:01 /tmp/file1 As we can see, the rhn_check now deployed the correct files and not the missing UID/GID files. Looking the logs we have: # cat /var/log/rhncfg-actions 2011-09-15 01:01:51 configfiles.deploy: Files successfully deployed: path: /tmp/file1 revision: 1 path: /etc/file2 revision: 1 path: /etc/hosts revision: 1 {} 2011-09-15 01:01:51 configfiles.deploy: Files not deployed for not having a valid uid/gid: path: /tmp/no_such_user_tmp_file revision: 2 path: /etc/no_such_user_file revision: 2 {} At webUI we have: Details: This action will be executed after 09/15/11 1:01:38 AM BRT. This action's status is: Failed. The client picked up this action on 09/15/11 1:01:52 AM BRT. The client completed this action on 09/15/11 1:01:53 AM BRT. Client execution returned "Files successfully deployed but some files were not deployed for not having a valid uid/gid" (code 44) Config Files: /etc/file2 (rev. 1) /etc/hosts (rev. 1) /etc/no_such_user_file (rev. 2) /tmp/file1 (rev. 1) /tmp/no_such_user_tmp_file (rev. 2) Afterwards, creating the missing user the deployment worked as expected: # useradd no_user # rhn_check -v .. { SNIP } .. D: do_call configfiles.deploy ({'files': [{'config_channel': 'no_user', 'username': 'root', 'encoding': 'base64', 'checksum': '361eac4774c9280fbd0c28221e3a7e39', 'filetype': 'file', 'delim_start': '{|', 'delim_end': '|}', 'symlink': '', 'groupname': 'root', 'file_contents': 'IyN0aGlzIGZpbGUgaXMgb3duZWQgYnkgcm9vdC9yb290Cg==\n', 'selinux_ctx': '', 'filemode': 644, 'path': '/tmp/file1', 'checksum_type': 'md5', 'revision': 1}, {'config_channel': 'no_user', 'username': 'root', 'encoding': 'base64', 'checksum': 'b2cbe5f297d9af192d82fd84e8284fa5', 'filetype': 'file', 'delim_start': '{|', 'delim_end': '|}', 'symlink': '', 'groupname': 'root', 'file_contents': 'IyMgdGhpcyBmaWxlIGlzIG93bmVkIGJ5IHJvb3Qvcm9vdAo=\n', 'selinux_ctx': '', 'filemode': 644, 'path': '/etc/file2', 'checksum_type': 'md5', 'revision': 1}, {'config_channel': 'no_user', 'username': 'no_user', 'encoding': 'base64', 'checksum': 'bbf7090602cc0b3560371070eea6adf9', 'filetype': 'file', 'delim_start': '{|', 'delim_end': '|}', 'symlink': '', 'groupname': 'no_user', 'file_contents': 'IyMgdGhpcyBmaWxlIGlzIG93bmVkIGJ5IG5vX3N1Y2hfdXNlci9ub19zdWNoX3VzZXIK\n', 'selinux_ctx': '', 'filemode': 644, 'path': '/etc/no_such_user_file', 'checksum_type': 'md5', 'revision': 2}, {'config_channel': 'no_user', 'username': 'no_user', 'encoding': 'base64', 'checksum': 'ff64077256ab8a9153e460ee04e42c22', 'filetype': 'file', 'delim_start
Re: [Spacewalk-devel] [PATCH] - 713072 Debian rhn_check not working with "Remote Command"
On 09/14/2011 10:26 AM, Miroslav Suchý wrote: > On 09/14/2011 02:31 PM, Simon Lukasik wrote: >> Applied as ab58bda9f93e3e9bbaba15a96855e4632ca8340b > And I put that new package to http://miroslav.suchy.cz/spacewalk/debian/ > > Thanks both of you. > Thank you guys! -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 736127 /var/log/rhn/rhn_server_xmlrpc.log does not log IP addresses , only 0.0.0.0
Hello, Follow a patch which fixes the BZ#736127. I created a test package and it worked as expected. Thank you. Cheers, mmello 0001-736127-fixed-var-log-rhn-rhn_server_xmlrpc.log-does-.patch Description: Binary data Marcelo Moreira de Mello RHCA RHCSS RHCVA Senior Software Maintenance Engineer - SEG gpg id: 2048/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 713072 Debian rhn_check not working with "Remote Command"
Howdy team, Here follow a patch with creates the directory structure for building rhncfg* packages to Debian platform. root@debian:/tmp# dpkg -i rhncfg_5.10.14_all.deb (Reading database ... 34641 files and directories currently installed.) Preparing to replace rhncfg 5.10.14 (using rhncfg_5.10.14_all.deb) ... Unpacking replacement rhncfg ... Setting up rhncfg (5.10.14) ... Processing triggers for man-db ... root@debian:/tmp# root@debian:/tmp# root@debian:/tmp# root@debian:/tmp# root@debian:/tmp# dpkg -s rhncfg Package: rhncfg Status: install ok installed Priority: extra Section: python Installed-Size: 664 Maintainer: Marcelo Moreira de Mello <mme...@redhat.com> Architecture: all Version: 5.10.14 Provides: rhncfg Depends: python, python-rhnlib (>= 2.5.40), rhn-client-tools Recommends: apt-spacewalk Conffiles: /etc/sysconfig/rhn/clientCaps.d/script 9a1472fa138bd7494676ba9b6b42d21d /etc/sysconfig/rhn/clientCaps.d/configfiles 81a1844c5c03f775696ba88b8dc1fc7d /etc/sysconfig/rhn/rhncfg-client.conf 887ca309bcb489e30db03a226f0e7d67 /etc/sysconfig/rhn/rhncfg-manager.conf 157aa57f8a5336f831fac29c4fec0d2d Description: Red Hat Network Configuration Management Client is some tools which provides a interface used to communicate against configuration channels. Homepage: https://fedorahosted.org/spacewalk Thank you! Cheers, mmello 0001-713072-created-directory-structure-to-build-rhncfg-p.patch Description: Binary data Marcelo Moreira de Mello ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - 672652 Kickstart "Kernel Options" and "Post Kernel Options" reject valid options
Hello, Follow attached a patch which allows multiple keys when setting kernel_options or kernel_post_options kickstart profile. I created a test spacewalk-java RPM package and it worked as expected. Thank you. Cheers, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 29 Aug 2011 16:06:00 -0300 Subject: [PATCH] 672652 - fixed allowing duplicate key for kernel_post_options and kernel_options editing kickstart profile: Kernel Options: console=tty0 console=ttyS0,9600n8 result: Kernel Options: console=ttyS0,9600n8 Thanks Alessadro Lazarotti for help. --- java/code/src/org/cobbler/CobblerObject.java | 28 + 1 files changed, 19 insertions(+), 9 deletions(-) diff --git a/java/code/src/org/cobbler/CobblerObject.java b/java/code/src/org/cobbler/CobblerObject.java index 025fae9..647dbfa 100644 --- a/java/code/src/org/cobbler/CobblerObject.java +++ b/java/code/src/org/cobbler/CobblerObject.java @@ -19,6 +19,7 @@ import com.redhat.rhn.common.util.StringUtil; import org.apache.commons.lang.StringUtils; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Date; @@ -335,11 +336,15 @@ public abstract class CobblerObject { private String convertOptionsMap(Map map) { StringBuilder string = new StringBuilder(); -for (Object key : map.keySet()) { -if (StringUtils.isEmpty((String)map.get(key))) { +for (String key : map.keySet()) { +if (map.get(key) == null) { string.append(key + " "); -} -else { +} else if(map.get(key) instanceof List){ +List values = (List)map.get(key); +for (String value : values) { +string.append(key + "=" + value + " "); +} +} else { string.append(key + "=" + map.get(key) + " "); } } @@ -372,7 +377,7 @@ public abstract class CobblerObject { private Map parseKernelOpts(String kernelOpts) { Map toRet = new HashMap(); -if (StringUtils.isEmpty(kernelOpts)) { +if (kernelOpts == null || kernelOpts.equals("")) { return toRet; } @@ -380,10 +385,15 @@ public abstract class CobblerObject { for (String option : options) { String[] split = option.split("="); if (split.length == 1) { -toRet.put(split[0], ""); -} -else if (split.length == 2) { -toRet.put(split[0], split[1]); +toRet.put(split[0], null); +} else if (split.length == 2) { +if (toRet.containsKey(split[0])) { +List list = (List)toRet.get(split[0]); +list.add(split[1]); +toRet.put(split[0], list); +} else { +toRet.put(split[0],new ArrayList(Arrays.asList(split[1]))); +} } } return toRet; -- 1.7.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] 728638 - Fixed kickstart.profile.setAdvancedOptions() to renderize the kickstart after invocating method
Hello, Here is a patch which fixes this issue updating and exporting the information to kickstart file. We built a scratch TEST rpm package including this patch for internal test and it worked as expected. Scratch package is available at https://brewweb.devel.redhat.com/taskinfo?taskID=3544146 Thank you! Cheers, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 9 Aug 2011 23:12:49 -0300 Subject: [PATCH] 728638 - Fixed kickstart.profile.setAdvancedOptions() to renderize the kickstart after invocating method. --- .../xmlrpc/kickstart/profile/ProfileHandler.java |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java index a51ce45..25a5565 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/profile/ProfileHandler.java @@ -589,6 +589,7 @@ public class ProfileHandler extends BaseHandler { } } cmd.getKickstartData().setOptions(customSet); +KickstartFactory.saveKickstartData(ksdata); return 1; } -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Howdy team, Any news regarding this patch? Thank you! On Thu, 2011-07-21 at 17:35 -0300, Marcelo Moreira de Mello wrote: > On Thu, 2011-07-21 at 13:21 +0200, Jan Pazdziora wrote: > > On Tue, Jul 19, 2011 at 02:38:24PM -0300, Marcelo Moreira de Mello wrote: > > > Not sure what would be verifying the Satellite/Spacewalk version. If > > rhncfg*, then, well, it should just gracefuly rename all to run, in > > runtime (as opposed to the postinstall time I originally proposed). > > > > Hello, > > Following advice from Jan, here is a new patch which honor the > script/run file for remote commands. > > If a script/all file were found, the options --report, --disable-all, > --disable-run, --enable-run will take care and rename the file > script/all to script/run which is expected and consistent with the > documentation. > > Also, if the file script/all were found when executing a remote > command, the patch will check the file and rename the script/all to > script/run at runtime, then customers can use old Satellite/Spacewalk > versions and newer rhncfg* package. > > All the tests regarding this patch worked as expected. > > Cheers, > mmello > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - fixed typo at Query bindParameters() on java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
Please, Note that probably there is more one typo: if (c.size() > 100) { - LOG.error("Query exectued with Collection larger than 1000"); + LOG.error("Query executed with Collection larger than 1000"); } The condition tests when > 100 but the LOG.error shows "larger than 1000". It seems that ERROR will be printed when searching larger than 1000. We filled a BZ#72 regarding this issue. We cloned the BZ#72 to Satellite, since a customer is hitting this issue. Follow the patch attached. Please, ignore the patch sent previously. Cheers, mmello On Mon, 2011-07-25 at 17:14 -0300, Marcelo Moreira de Mello wrote: > Hello, > > Follow attached a patch which fixes a typo (s/exectued/executed/g) at > HibernateFactory.java. > > Thank you! > > Cheers, > mmello > > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 25 Jul 2011 17:19:34 -0300 Subject: [PATCH] RHBZ#72 - fix typo for test in c.size() and LOG.error statement --- .../rhn/common/hibernate/HibernateFactory.java |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java index addb07d..c1fed0e 100644 --- a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java +++ b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java @@ -132,8 +132,8 @@ public abstract class HibernateFactory { Map.Entry entry = (Map.Entry) itr.next(); if (entry.getValue() instanceof Collection) { Collection c = (Collection) entry.getValue(); -if (c.size() > 100) { -LOG.error("Query exectued with Collection larger than 1000"); +if (c.size() > 1000) { +LOG.error("Query executed with Collection larger than 1000"); } query.setParameterList((String) entry.getKey(), c); } -- 1.7.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - fixed typo at Query bindParameters() on java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java
Hello, Follow attached a patch which fixes a typo (s/exectued/executed/g) at HibernateFactory.java. Thank you! Cheers, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Mon, 25 Jul 2011 17:10:14 -0300 Subject: [PATCH] Fixed typo at Query bindParameters() --- .../rhn/common/hibernate/HibernateFactory.java |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java index addb07d..d9f48ec 100644 --- a/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java +++ b/java/code/src/com/redhat/rhn/common/hibernate/HibernateFactory.java @@ -133,7 +133,7 @@ public abstract class HibernateFactory { if (entry.getValue() instanceof Collection) { Collection c = (Collection) entry.getValue(); if (c.size() > 100) { -LOG.error("Query exectued with Collection larger than 1000"); +LOG.error("Query executed with Collection larger than 1000"); } query.setParameterList((String) entry.getKey(), c); } -- 1.7.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
On Thu, 2011-07-21 at 13:21 +0200, Jan Pazdziora wrote: > On Tue, Jul 19, 2011 at 02:38:24PM -0300, Marcelo Moreira de Mello wrote: > Not sure what would be verifying the Satellite/Spacewalk version. If > rhncfg*, then, well, it should just gracefuly rename all to run, in > runtime (as opposed to the postinstall time I originally proposed). > Hello, Following advice from Jan, here is a new patch which honor the script/run file for remote commands. If a script/all file were found, the options --report, --disable-all, --disable-run, --enable-run will take care and rename the file script/all to script/run which is expected and consistent with the documentation. Also, if the file script/all were found when executing a remote command, the patch will check the file and rename the script/all to script/run at runtime, then customers can use old Satellite/Spacewalk versions and newer rhncfg* package. All the tests regarding this patch worked as expected. Cheers, mmello -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Thu, 21 Jul 2011 17:09:36 -0300 Subject: [PATCH] RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands --- client/tools/rhncfg/actions/ModeController.py |3 +++ .../tools/rhncfg/actions/ModeControllerCreator.py |4 ++-- client/tools/rhncfg/actions/Modes.py | 12 client/tools/rhncfg/actions/configfiles.py |3 +++ client/tools/rhncfg/actions/rhn-actions-control.py |6 ++ .../rhn/manager/kickstart/KickstartFormatter.java |2 +- 6 files changed, 27 insertions(+), 3 deletions(-) diff --git a/client/tools/rhncfg/actions/ModeController.py b/client/tools/rhncfg/actions/ModeController.py index 9de0b41..1548175 100644 --- a/client/tools/rhncfg/actions/ModeController.py +++ b/client/tools/rhncfg/actions/ModeController.py @@ -47,6 +47,9 @@ class ModeController: for m in self.mode_list.keys(): self.mode_list[m].on() +if self.mode_list['all'].is_on(): +self.mode_list['all'].off() + #Turn off all of the modes. def all_off(self): for m in self.mode_list.keys(): diff --git a/client/tools/rhncfg/actions/ModeControllerCreator.py b/client/tools/rhncfg/actions/ModeControllerCreator.py index 75dc860..ae7822a 100644 --- a/client/tools/rhncfg/actions/ModeControllerCreator.py +++ b/client/tools/rhncfg/actions/ModeControllerCreator.py @@ -56,9 +56,9 @@ def get_controller_creator(): def get_run_controller_creator(): if string.find(sys.platform, 'sunos') > -1: -mode_list = [Modes.SolarisRunMode()] +mode_list = [Modes.SolarisRunMode(), Modes.SolarisRunAllMode()] else: -mode_list = [Modes.RunMode()] +mode_list = [Modes.RunMode(), Modes.RunAllMode()] controller = ModeControllerCreator(mode_list=mode_list) return controller diff --git a/client/tools/rhncfg/actions/Modes.py b/client/tools/rhncfg/actions/Modes.py index 3523a57..fefeda74 100644 --- a/client/tools/rhncfg/actions/Modes.py +++ b/client/tools/rhncfg/actions/Modes.py @@ -119,6 +119,12 @@ class RunMode(ConfigFilesBaseMode): self.name = "run" self.ph.set_rhn_root("/etc/sysconfig/rhn/allowed-actions/script") +class RunAllMode(ConfigFilesBaseMode): +def __init__(self): +ConfigFilesBaseMode.__init__(self) +self.name = "all" +self.ph.set_rhn_root("/etc/sysconfig/rhn/allowed-actions/script") + class AllMode(ConfigFilesBaseMode): def __init__(self): ConfigFilesBaseMode.__init__(self) @@ -151,6 +157,12 @@ class SolarisRunMode(ConfigFilesBaseMode): self.name = "run" self.ph.set_rhn_root("/opt/redhat/rhn/solaris/etc/sysconfig/rhn/allowed-actions/script") +class SolarisAllRunMode(ConfigFilesBaseMode): +def __init__(self): +ConfigFilesBaseMode.__init__(self) +self.name = "all" +self.ph.set_rhn_root("/opt/redhat/rhn/solaris/etc/sysconfig/rhn/allowed-actions/script") + class SolarisAllMode(ConfigFilesBaseMode): def __init__(self): ConfigFilesBaseMode.__init__(self) diff --git a/client/tools/rhncfg/actions/configfiles.py b/client/tools/rhncfg/actions/configfiles.py index 76671ab..0b0d6c0 100755 --- a/client/tools/rhncfg/actions/configfiles.py +++ b/client/tools/rhncfg/actions/configfiles.py @@ -53,6 +53,9 @@ def _local_permission_check(action_type): all_structure = atype_structure[:i] all_structure.append('all') +if os.path.exists(os.path.join(_permission_root_dir, "script/all")) and action_type == "script.run": +os.rename(os.path.join(_permission_root_dir, "script/all"),os.path.join(_permission_root_dir, "script/run")) + potential_all_path = apply(os.path.j
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
On Tue, 2011-07-19 at 18:28 +0200, Jan Pazdziora wrote: > On Fri, Jul 15, 2011 at 03:43:34PM -0300, Marcelo Moreira de Mello wrote: > > > > But for those systems already installed and when updating the rhncfg* > > packages, the %post scriptlet will works and make it compatible with > > script/run. That's why we test if the script/all exits and then move the > > file. > > Right. > > > But, if the Remote commands were enabled at KS, the file /script/run > > will be created at KS normally. > > Not if you kickstart using say Satellite 5.4 or Spacewalk 1.4 that > create /script/all. The compatibility of the new (fixed) rhncfg* code > (being installed) with the old server (that generates the kickstart > file) is the issue. > Yes. Makes sense! What do you think if we verify the Satellite/Spacewalk version and then apply /script/run or /script/all. What do you think? -- Marcelo Moreira de Mello Red Hat Inc. ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
On 07/15/2011 11:39 AM, Jan Pazdziora wrote: > It's the combination of Spacewalk 1.4 (or Satellite 5.3, 5.4) and new > rhncfg* being kickstarted. > > The file is touched in the kickstart file only after the rhncfg* > packages were installed. So the %post scriptlet trick does not apply > (there is no file there when the package is being installed) and then > the script/all gets created and the package never sees it because it > was modified to only assume and use script/run. Hello, But for those systems already installed and when updating the rhncfg* packages, the %post scriptlet will works and make it compatible with script/run. That's why we test if the script/all exits and then move the file. But, if the Remote commands were enabled at KS, the file /script/run will be created at KS normally. Cheers, mmello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
On 07/15/2011 07:23 AM, Michael Mraka wrote: > Marcelo Moreira de Mello wrote: > % Hello, > % > % Follow attached a new patch which include the 3 modifications: > % > % 1) Change KickstartFormatter.java to create the "run" file instead > % of "all"; > % > % 2) Adds a %post script to move any existing "all" to "run", making > % it consistent with the documentation and with the new kickstart > % > % 3) Disable any actions based on the > % /etc/sysconfig/rhn/allowed-actions/script/all and make it only use the > % "run" file. > > Hi Marcello, Hello Michael, > * Which part (line of code) actually checks .../script/run file > existence? I'd like to check it for a possible regression but was not > able to find it ;). rhncfg-* works based on modules. The are some functions with pass as argument the module's name. ModeController.py 56 #Check to see if the mode is on. 57 def is_on(self, mode_name): 58 if self.mode_list.has_key(mode_name): 59 return self.mode_list[mode_name].is_on() 60 else: 61 return 0 Modes.py 122 class RunMode(ConfigFilesBaseMode): 123 def __init__(self): 124 ConfigFilesBaseMode.__init__(self) 125 self.name = "run" 126 self.ph.set_rhn_root("/etc/sysconfig/rhn/allowed-actions/script"). ModeControllerCreator.py 58 def get_run_controller_creator(): 59 if string.find(sys.platform, 'sunos') > -1: 60 mode_list = [Modes.SolarisRunMode()] 61 else: 62 mode_list = [Modes.RunMode()] Basically the patch will only allow to execute remote commands if the file allowed-actions/script/run exists. # rhn_check -vv D: check_action {'action': "\n\nscript.run\n\n\n67\n\n\n\n\nusername\nroot\n\n\ngroupname\nroot\n\n\nnow\n2011-07-15 10:50:34\n\n\ntimeout\n600\n\n\nscript\n#!/bin/sh\ndate\n\n\n\n\n\n", 'version': 2, 'id': 67} {SNIP} If you look the xml above, the methodName is script.run which will match with the class RunMode(). So, our patch fixes the function which verify if the local system have the permission (actually the files within allowed-actions/scripts or allowed-actions/configfiles). The function receives an 'action_type' passed by argument. If the action_type were per example 'diff' and the local system only have the file allowed-actions/configfiles/'all', the code used to append the 'all' and the diff files works as expected. But, if a function receives a 'run' and the local system only have the file allowed-actions/script/all, the function will first look for 'run', and then append the 'all' and the remote command will be executed as well (which is not expected, since the allow remote commands we need the file 'run' and not 'all' according with the documentation). What our patch does it to verify if the action_type is 'script.run', and if yes ignoring to check if 'all' file is present. 'all' will continue to be append for action_type configfiles. configfiles.py 44 def _local_permission_check(action_type): 45 # action_type ala configfiles.deploy 46 atype_structure = split(action_type, '.') 47 48 for i in range(len(atype_structure)): 49 all_structure = atype_structure[:i] 50 if action_type == "script.run": 51 all_structure.append('run') 52 else: 53 all_structure.append('all') 54 55 potential_all_path = apply(os.path.join, all_structure) 56 if os.path.exists(os.path.join(_permission_root_dir, potential_all_path)): <--- check file 57 return 1 58 59 action_path = apply(os.path.join, atype_structure) 60 return os.path.exists(os.path.join(_permission_root_dir, action_path)) > * Will the new code work with kickstarts from current spacewalk which > contain 'touch .../script/all'? I mean if new rhncfg-* is installed so > it looks for .../script/run but no %postinst which renames > .../script/all to .../script/run has fired. Yes. If customer upgrade the rhncfg* packages, at the %post section, the file will be automatically renamed to 'run' if ../script/'all' exists. rhncfg.spec 107 %post 108 test -f /etc/sysconfig/rhn/allowed-actions/script/all \ 109 && mv /etc/sysconfig/rhn/allowed-actions/script/all /etc/sysconfig/rhn/allowed-actions/script/run To new kickstarts, this the file will be deployed as expected. KickstartFormatter.java 123 "touch /etc/sysconfig/rhn/allowed-actions/script/run"; Please, let me know if you have further questions. Best Regards, Marcelo > > Regards, > > -- > Michael Mráka > Satellite Engi
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Hello, Follow attached a new patch which include the 3 modifications: 1) Change KickstartFormatter.java to create the "run" file instead of "all"; 2) Adds a %post script to move any existing "all" to "run", making it consistent with the documentation and with the new kickstart 3) Disable any actions based on the /etc/sysconfig/rhn/allowed-actions/script/all and make it only use the "run" file. Thank you! Cheers, Marcelo Moreira de Mello On 07/14/2011 11:58 AM, Marcelo Moreira de Mello wrote: > On 07/14/2011 09:58 AM, Jan Pazdziora wrote: >> On Thu, Jul 14, 2011 at 02:54:41PM +0200, Jan Pazdziora wrote: >>> On Wed, Jul 06, 2011 at 02:05:12PM -0300, Marcelo Moreira de Mello wrote: >>>> Howdy, >>>> >>>> Any news regarding this patch? >>> Marcelo, >>> >>> could you explain in deeper detail what in the current (Spacewalk) >>> code makes both 'all' and 'run' to be taken as True for the >>> script.run action? >> The reason I ask is: >> >> If both the current and old versions of rhncfg* observe >> the /etc/sysconfig/rhn/allowed-actions/script/run file correctly, then >> there would be no problem changing the touch in >> KickstartFormatter.java to create the "run" file instead of "all". So >> no new installation would have the "all" file there. > Yes. Agreed. That what I have I thought when I submitted the first patch. >> Since the rhn-actions-control only seems to create and remove the >> "run" file, we could then use %post script of some of the rhncfg >> package to move any existing "all" to "run", to make it consistent >> with the documentation and with new kickstart. > Great! Sounds goods! >> Then we would also need to disable any actions based on the >> /etc/sysconfig/rhn/allowed-actions/script/all file in the rhncfg* >> packages, and make it only use the "run" file as its flag. > OK. I'm working into this. > Cheers, > mmello > From: Marcelo Moreira de Mello Date: Thu, 14 Jul 2011 13:26:22 -0300 Subject: [PATCH] RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands --- client/tools/rhncfg/actions/configfiles.py |5 - client/tools/rhncfg/rhncfg.spec|4 .../rhn/manager/kickstart/KickstartFormatter.java |2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/actions/configfiles.py b/client/tools/rhncfg/actions/configfiles.py index 76671ab..609e1d9 100755 --- a/client/tools/rhncfg/actions/configfiles.py +++ b/client/tools/rhncfg/actions/configfiles.py @@ -51,7 +51,10 @@ def _local_permission_check(action_type): for i in range(len(atype_structure)): all_structure = atype_structure[:i] -all_structure.append('all') +if action_type == "script.run": +all_structure.append('run') +else: +all_structure.append('all') potential_all_path = apply(os.path.join, all_structure) if os.path.exists(os.path.join(_permission_root_dir, potential_all_path)): diff --git a/client/tools/rhncfg/rhncfg.spec b/client/tools/rhncfg/rhncfg.spec index 8f53731..5bd4f21 100644 --- a/client/tools/rhncfg/rhncfg.spec +++ b/client/tools/rhncfg/rhncfg.spec @@ -104,6 +104,10 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{client_caps_dir}/* %{_mandir}/man8/rhn-actions-control.8* +%post +test -f /etc/sysconfig/rhn/allowed-actions/script/all \ +&& mv /etc/sysconfig/rhn/allowed-actions/script/all /etc/sysconfig/rhn/allowed-actions/script/run + # $Id$ %changelog * Thu Jun 16 2011 Jan Pazdziora 5.10.8-1 diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java index 0aa0f75..a4c761a 100644 --- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java +++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java @@ -120,7 +120,7 @@ public class KickstartFormatter { private static final String WGET_RPMS = "wget -P /tmp/rhn_rpms "; private static final String REMOTE_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/script" + NEWLINE + -"touch /etc/sysconfig/rhn/allowed-actions/script/all"; +"touch /etc/sysconfig/rhn/allowed-actions/script/run"; private static final String CONFIG_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/configfiles" + NEWLINE + "touch /etc/sysconfig/rhn/allowed-actions/configfiles/all"; -- 1.7.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
On 07/14/2011 09:58 AM, Jan Pazdziora wrote: > On Thu, Jul 14, 2011 at 02:54:41PM +0200, Jan Pazdziora wrote: >> On Wed, Jul 06, 2011 at 02:05:12PM -0300, Marcelo Moreira de Mello wrote: >>> Howdy, >>> >>> Any news regarding this patch? >> Marcelo, >> >> could you explain in deeper detail what in the current (Spacewalk) >> code makes both 'all' and 'run' to be taken as True for the >> script.run action? > The reason I ask is: > > If both the current and old versions of rhncfg* observe > the /etc/sysconfig/rhn/allowed-actions/script/run file correctly, then > there would be no problem changing the touch in > KickstartFormatter.java to create the "run" file instead of "all". So > no new installation would have the "all" file there. Yes. Agreed. That what I have I thought when I submitted the first patch. > Since the rhn-actions-control only seems to create and remove the > "run" file, we could then use %post script of some of the rhncfg > package to move any existing "all" to "run", to make it consistent > with the documentation and with new kickstart. Great! Sounds goods! > Then we would also need to disable any actions based on the > /etc/sysconfig/rhn/allowed-actions/script/all file in the rhncfg* > packages, and make it only use the "run" file as its flag. OK. I'm working into this. Cheers, mmello -- Marcelo Moreira de Mello ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] PATCH BZ#633400 - rhncfg-client lists lower-ranked config channel for file
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 110002 /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 ChannelFile 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 110002 /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 Red Hat Inc. From: Marcelo Moreira de Mello 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
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Howdy, Any news regarding this patch? Thanks! Cheers, mmello On Sat, 2011-06-25 at 02:24 -0300, Marcelo Moreira de Mello wrote: > Hello, > > Follow a new patch which follow the guidelines raise by Jan. This > patch makes rhn-actions-control --disable-all to remove both files and > --report check if all or run file exists. > > # rhn-actions-control --disable-all ; > tree /etc/sysconfig/rhn/allowed-actions > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > `-- script > > # rhn-actions-control --report ; tree /etc/sysconfig/rhn/allowed-actions > deploy is disabled > diff is disabled > upload is disabled > mtime_upload is disabled > run is disabled > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > `-- script > > 2 directories, 0 files > # rhn-actions-control --enable-all ; > tree /etc/sysconfig/rhn/allowed-actions > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > | `-- all > `-- script > `-- all > > # rhn-actions-control --report ; tree /etc/sysconfig/rhn/allowed-actions > deploy is enabled > diff is enabled > upload is enabled > mtime_upload is enabled > run is enabled > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > | `-- all > `-- script > `-- all > > # rhn-actions-control --disable-all ; > tree /etc/sysconfig/rhn/allowed-actions > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > `-- script > > # rhn-actions-control --enable-run ; > tree /etc/sysconfig/rhn/allowed-actions ; rhn-actions-control --report > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > `-- script > `-- run > > deploy is disabled > diff is disabled > upload is disabled > mtime_upload is disabled > run is enabled > > # rhn-actions-control --disable-run ; > tree /etc/sysconfig/rhn/allowed-actions ; rhn-actions-control --report > /etc/sysconfig/rhn/allowed-actions > |-- configfiles > `-- script > > deploy is disabled > diff is disabled > upload is disabled > mtime_upload is disabled > run is disabled > > Thank you! > > Cheers, > mmello > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Hello, Follow a new patch which follow the guidelines raise by Jan. This patch makes rhn-actions-control --disable-all to remove both files and --report check if all or run file exists. # rhn-actions-control --disable-all ; tree /etc/sysconfig/rhn/allowed-actions /etc/sysconfig/rhn/allowed-actions |-- configfiles `-- script # rhn-actions-control --report ; tree /etc/sysconfig/rhn/allowed-actions deploy is disabled diff is disabled upload is disabled mtime_upload is disabled run is disabled /etc/sysconfig/rhn/allowed-actions |-- configfiles `-- script 2 directories, 0 files # rhn-actions-control --enable-all ; tree /etc/sysconfig/rhn/allowed-actions /etc/sysconfig/rhn/allowed-actions |-- configfiles | `-- all `-- script `-- all # rhn-actions-control --report ; tree /etc/sysconfig/rhn/allowed-actions deploy is enabled diff is enabled upload is enabled mtime_upload is enabled run is enabled /etc/sysconfig/rhn/allowed-actions |-- configfiles | `-- all `-- script `-- all # rhn-actions-control --disable-all ; tree /etc/sysconfig/rhn/allowed-actions /etc/sysconfig/rhn/allowed-actions |-- configfiles `-- script # rhn-actions-control --enable-run ; tree /etc/sysconfig/rhn/allowed-actions ; rhn-actions-control --report /etc/sysconfig/rhn/allowed-actions |-- configfiles `-- script `-- run deploy is disabled diff is disabled upload is disabled mtime_upload is disabled run is enabled # rhn-actions-control --disable-run ; tree /etc/sysconfig/rhn/allowed-actions ; rhn-actions-control --report /etc/sysconfig/rhn/allowed-actions |-- configfiles `-- script deploy is disabled diff is disabled upload is disabled mtime_upload is disabled run is disabled Thank you! Cheers, mmello -- Marcelo Moreira de Mello Red Hat Inc. On Fri, 2011-06-17 at 14:11 -0300, Marcelo Moreira de Mello wrote: > Hello Jan, > On Thu, 2011-06-16 at 16:38 +0200, Jan Pazdziora wrote: > > On Thu, Jun 02, 2011 at 07:30:23PM -0300, Marcelo Moreira de Mello wrote: > > > > > > Follow attached the patch which fixes the BZ#508936. > > > > > > At RHN Satellite/Spacewalk documentation, to be able to execute remote > > > commands, it must exists a file named "run" into > > > /etc/sysconfig/rhn/allowed-actions/scripts directory. > > > > > > This patch fixes remote commands only be executed if the file "run" > > > exists into allowed-actions/scripts directory. All the other files will > > > be ignored. > > > > While this patch might make the behaviour consistent with the > > documentation, it will likely break existing clients. If the client > > has a file 'all' and remote commands are working fine (and are > > expected to work), suddenly they will stop working. > Agreed. > > > > We really have to think about the upgrade implications. > > > > If I understand it correctly, your concern is that even if > > > > rhn-actions-control --disable-all > > > > is run and passes, it does not disable the option because it removes > > the other file. Well, for that, one possibility is to always remove > > both files when disabling. > Yes. I think that we can fix this issue, making the --disable-all option > remove the both files ('all' and 'run'). I'm working into this. I'll > post the patch ASAP. > > Thank you regarding the guidelines. > > Cheers, > Marcelo Moreira de Mello > > > > > To make it consistent, we also fixed KickstartFormatter.java, which now > > > appends into kickstart the 'run' instead 'all' into > > > /etc/sysconfig/rhn/allowed-actions directory when rendering the > > > kickstart file. > > > > Did you verify that even old RHN Tools packages (RHEL 5, RHEL 4) use > > both "run" and "all" file to enable the option? In other words, won't > > this Spacewalk change break behaviour of existing distributions that > > people might be kickstarting? > > > > > After patched, --report option works as expected (ignoring all the > > > other files created manually) and remote commands will be only executed > > > when a file "run" exists at allowed-action/scripts directory. > > > > Nack. I don't see an upgrade path for systems that already have the > > 'all' file and are happy that things work. > > > From: Marcelo Moreira de Mello Date: Sat, 25 Jun 2011 02:17:33 -0300 Subject: [PATCH] RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands --- client/tools/rhncfg/actions/ModeController.py |3 +++ .../tools/rhncfg/actions/ModeControllerCreator.py |4 ++-- client/tools/rhncfg/act
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Hello Jan, On Thu, 2011-06-16 at 16:38 +0200, Jan Pazdziora wrote: > On Thu, Jun 02, 2011 at 07:30:23PM -0300, Marcelo Moreira de Mello wrote: > > > > Follow attached the patch which fixes the BZ#508936. > > > > At RHN Satellite/Spacewalk documentation, to be able to execute remote > > commands, it must exists a file named "run" into > > /etc/sysconfig/rhn/allowed-actions/scripts directory. > > > > This patch fixes remote commands only be executed if the file "run" > > exists into allowed-actions/scripts directory. All the other files will > > be ignored. > > While this patch might make the behaviour consistent with the > documentation, it will likely break existing clients. If the client > has a file 'all' and remote commands are working fine (and are > expected to work), suddenly they will stop working. Agreed. > > We really have to think about the upgrade implications. > > If I understand it correctly, your concern is that even if > > rhn-actions-control --disable-all > > is run and passes, it does not disable the option because it removes > the other file. Well, for that, one possibility is to always remove > both files when disabling. Yes. I think that we can fix this issue, making the --disable-all option remove the both files ('all' and 'run'). I'm working into this. I'll post the patch ASAP. Thank you regarding the guidelines. Cheers, Marcelo Moreira de Mello > > > To make it consistent, we also fixed KickstartFormatter.java, which now > > appends into kickstart the 'run' instead 'all' into > > /etc/sysconfig/rhn/allowed-actions directory when rendering the > > kickstart file. > > Did you verify that even old RHN Tools packages (RHEL 5, RHEL 4) use > both "run" and "all" file to enable the option? In other words, won't > this Spacewalk change break behaviour of existing distributions that > people might be kickstarting? > > > After patched, --report option works as expected (ignoring all the > > other files created manually) and remote commands will be only executed > > when a file "run" exists at allowed-action/scripts directory. > > Nack. I don't see an upgrade path for systems that already have the > 'all' file and are happy that things work. > -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Hello, Here follow a better patch which check if the action_type if configfiles or script. Please, ignore the patch sent previously. Thank you! Cheers, Marcelo On 06/02/2011 07:30 PM, Marcelo Moreira de Mello wrote: > Hello, > > Follow attached the patch which fixes the BZ#508936. > > At RHN Satellite/Spacewalk documentation, to be able to execute remote > commands, it must exists a file named "run" into > /etc/sysconfig/rhn/allowed-actions/scripts directory. > > This patch fixes remote commands only be executed if the file "run" > exists into allowed-actions/scripts directory. All the other files will > be ignored. > > To make it consistent, we also fixed KickstartFormatter.java, which now > appends into kickstart the 'run' instead 'all' into > /etc/sysconfig/rhn/allowed-actions directory when rendering the > kickstart file. > > After patched, --report option works as expected (ignoring all the > other files created manually) and remote commands will be only executed > when a file "run" exists at allowed-action/scripts directory. > > # rhn-actions-control --enable-all ; tree /etc/sysconfig/rhn/allowed-actions > |-- configfiles > | `-- all > `-- script > `-- run > > 2 directories, 2 files > > # rhn-actions-control --report > deploy is enabled > diff is enabled > upload is enabled > mtime_upload is enabled > run is enabled > > # rhn-actions-control --disable-all ; tree > /etc/sysconfig/rhn/allowed-actions/ > /etc/sysconfig/rhn/allowed-actions/ > |-- configfiles > `-- script > > 2 directories, 0 files > > # rhn-actions-control --report > deploy is disabled > diff is disabled > upload is disabled > mtime_upload is disabled > run is disabled > > > ** Even forcing the file, it will be ignored > # touch /etc/sysconfig/rhn/allowed-actions/script/all > # rhn-actions-control --report > deploy is disabled > diff is disabled > upload is disabled > mtime_upload is disabled > run is disabled > > > Cheers, > Marcelo Moreira de Mello > > > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Fri, 3 Jun 2011 12:15:16 -0300 Subject: [PATCH] RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands --- client/tools/rhncfg/actions/configfiles.py |5 - .../rhn/manager/kickstart/KickstartFormatter.java |2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/actions/configfiles.py b/client/tools/rhncfg/actions/configfiles.py index 76671ab..609e1d9 100755 --- a/client/tools/rhncfg/actions/configfiles.py +++ b/client/tools/rhncfg/actions/configfiles.py @@ -51,7 +51,10 @@ def _local_permission_check(action_type): for i in range(len(atype_structure)): all_structure = atype_structure[:i] -all_structure.append('all') +if action_type == "script.run": +all_structure.append('run') +else: +all_structure.append('all') potential_all_path = apply(os.path.join, all_structure) if os.path.exists(os.path.join(_permission_root_dir, potential_all_path)): diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java index 0aa0f75..a4c761a 100644 --- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java +++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java @@ -120,7 +120,7 @@ public class KickstartFormatter { private static final String WGET_RPMS = "wget -P /tmp/rhn_rpms "; private static final String REMOTE_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/script" + NEWLINE + -"touch /etc/sysconfig/rhn/allowed-actions/script/all"; +"touch /etc/sysconfig/rhn/allowed-actions/script/run"; private static final String CONFIG_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/configfiles" + NEWLINE + "touch /etc/sysconfig/rhn/allowed-actions/configfiles/all"; -- 1.7.5.2 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - RHBZ#508936 - Run remote command works even when run is disabled on the client
Hello, Follow attached the patch which fixes the BZ#508936. At RHN Satellite/Spacewalk documentation, to be able to execute remote commands, it must exists a file named "run" into /etc/sysconfig/rhn/allowed-actions/scripts directory. This patch fixes remote commands only be executed if the file "run" exists into allowed-actions/scripts directory. All the other files will be ignored. To make it consistent, we also fixed KickstartFormatter.java, which now appends into kickstart the 'run' instead 'all' into /etc/sysconfig/rhn/allowed-actions directory when rendering the kickstart file. After patched, --report option works as expected (ignoring all the other files created manually) and remote commands will be only executed when a file "run" exists at allowed-action/scripts directory. # rhn-actions-control --enable-all ; tree /etc/sysconfig/rhn/allowed-actions |-- configfiles | `-- all `-- script `-- run 2 directories, 2 files # rhn-actions-control --report deploy is enabled diff is enabled upload is enabled mtime_upload is enabled run is enabled # rhn-actions-control --disable-all ; tree /etc/sysconfig/rhn/allowed-actions/ /etc/sysconfig/rhn/allowed-actions/ |-- configfiles `-- script 2 directories, 0 files # rhn-actions-control --report deploy is disabled diff is disabled upload is disabled mtime_upload is disabled run is disabled ** Even forcing the file, it will be ignored # touch /etc/sysconfig/rhn/allowed-actions/script/all # rhn-actions-control --report deploy is disabled diff is disabled upload is disabled mtime_upload is disabled run is disabled Cheers, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 2 Jun 2011 18:58:45 -0300 Subject: [PATCH] RHBZ#508936 - rhn-actions-control honor the allowed-actions/scripts/run for remote commands --- client/tools/rhncfg/actions/configfiles.py |2 +- .../rhn/manager/kickstart/KickstartFormatter.java |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/actions/configfiles.py b/client/tools/rhncfg/actions/configfiles.py index 76671ab..73c460b 100755 --- a/client/tools/rhncfg/actions/configfiles.py +++ b/client/tools/rhncfg/actions/configfiles.py @@ -51,7 +51,7 @@ def _local_permission_check(action_type): for i in range(len(atype_structure)): all_structure = atype_structure[:i] -all_structure.append('all') +all_structure.append('run') potential_all_path = apply(os.path.join, all_structure) if os.path.exists(os.path.join(_permission_root_dir, potential_all_path)): diff --git a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java index 0aa0f75..a4c761a 100644 --- a/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java +++ b/java/code/src/com/redhat/rhn/manager/kickstart/KickstartFormatter.java @@ -120,7 +120,7 @@ public class KickstartFormatter { private static final String WGET_RPMS = "wget -P /tmp/rhn_rpms "; private static final String REMOTE_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/script" + NEWLINE + -"touch /etc/sysconfig/rhn/allowed-actions/script/all"; +"touch /etc/sysconfig/rhn/allowed-actions/script/run"; private static final String CONFIG_CMD = "mkdir -p /etc/sysconfig/rhn/allowed-actions/configfiles" + NEWLINE + "touch /etc/sysconfig/rhn/allowed-actions/configfiles/all"; -- 1.7.5.2 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - RHBZ#709365 - kickstart.deleteProfiles does not return 0 on kickstart not found
Hello, Please, use this patch attached which I fixed a typo at successful word. Please, ignore the patch sent previously. Thanks. Cheers, Marcelo On 05/31/2011 01:30 PM, Marcelo Moreira de Mello wrote: > Hello, > > This patch fixes the documentation for kickstart API when a kickstart > is not found. > > Cheers, > Marcelo Moreira de Mello > > > > ___ > Spacewalk-devel mailing list > Spacewalk-devel@redhat.com > https://www.redhat.com/mailman/listinfo/spacewalk-devel From: Marcelo Moreira de Mello Date: Tue, 31 May 2011 13:55:49 -0400 Subject: [PATCH] rhbz#709365 - fixed delete kickstart API docs --- .../xmlrpc/kickstart/KickstartHandler.java | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java index ea21642..1c3acc2 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java @@ -375,14 +375,13 @@ public class KickstartHandler extends BaseHandler { * delete a kickstart profile * @param sessionKey the session key * @param ksLabel the kickstart to remove an ip range from - * @return 1 on removal, 0 if not found, exception otherwise + * @return 1 if successful, exception otherwise. * * @xmlrpc.doc Delete a kickstart profile * @xmlrpc.param #session_key() * @xmlrpc.param #param_desc("string", "ksLabel", "The label of * the kickstart profile you want to remove") - * @xmlrpc.returntype int - 1 on successful deletion, 0 if kickstart wasn't found - * or couldn't be deleted. + * @xmlrpc.returntype #return_int_success() */ public int deleteProfile(String sessionKey, String ksLabel) { User user = getLoggedInUser(sessionKey); @@ -392,12 +391,8 @@ public class KickstartHandler extends BaseHandler { KickstartData ksdata = lookupKsData(ksLabel, user.getOrg()); KickstartDeleteCommand com = new KickstartDeleteCommand(ksdata.getId(), user); ValidatorError error = com.store(); -if (error == null) { -return 1; -} -else { -return 0; -} + +return 1; } /** -- 1.5.5.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - RHBZ#709365 - kickstart.deleteProfiles does not return 0 on kickstart not found
Hello, This patch fixes the documentation for kickstart API when a kickstart is not found. Cheers, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 31 May 2011 13:37:11 -0400 Subject: [PATCH] rhbz#709365 - fixed delete kickstart API docs --- .../xmlrpc/kickstart/KickstartHandler.java | 13 - 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java index ea21642..3f8e9b7 100644 --- a/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java +++ b/java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java @@ -375,14 +375,13 @@ public class KickstartHandler extends BaseHandler { * delete a kickstart profile * @param sessionKey the session key * @param ksLabel the kickstart to remove an ip range from - * @return 1 on removal, 0 if not found, exception otherwise + * @return 1 if sucessful, exception otherwise. * * @xmlrpc.doc Delete a kickstart profile * @xmlrpc.param #session_key() * @xmlrpc.param #param_desc("string", "ksLabel", "The label of * the kickstart profile you want to remove") - * @xmlrpc.returntype int - 1 on successful deletion, 0 if kickstart wasn't found - * or couldn't be deleted. + * @xmlrpc.returntype #return_int_success() */ public int deleteProfile(String sessionKey, String ksLabel) { User user = getLoggedInUser(sessionKey); @@ -392,12 +391,8 @@ public class KickstartHandler extends BaseHandler { KickstartData ksdata = lookupKsData(ksLabel, user.getOrg()); KickstartDeleteCommand com = new KickstartDeleteCommand(ksdata.getId(), user); ValidatorError error = com.store(); -if (error == null) { -return 1; -} -else { -return 0; -} + +return 1; } /** -- 1.5.5.6 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] SFDC#00474175 - webUI returns 503 error when accessing the system tab (Customer: Comcast)
tail -f /var/log/httpd/ssl_access_log 10.11.9.75 - - [24/May/2011:12:09:37 -0400] "GET /rhn/software/channels/All.do HTTP/1.1" 200 137344 10.11.9.75 - - [24/May/2011:12:09:38 -0400] "GET /rhn/dwr/engine.js HTTP/1.1" 200 46055 10.11.9.75 - - [24/May/2011:12:09:43 -0400] "GET /rhn/systems/Overview.do HTTP/1.1" 503 402 I'm running without options on this case. Do you guys have some clues from what we can do to identify/debug the issue? Why the systems tab take to long to return, if the SQL return pretty quickly. Thanks for your attention. Cheers, --marcelo -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#702524 - rhncfg-client does not deploy an file when permission is set to 000 by webUI
Hello Jan, Following your guidelines, here is a better patch which fixes that issue. Thank you. Cheers, Marcelo -- Marcelo Moreira de Mello Red Hat Inc. On 05/06/2011 05:19 AM, Jan Pazdziora wrote: On Fri, May 06, 2011 at 12:48:15AM -0300, Marcelo Moreira de Mello wrote: Hello, This patch fixes the rhncfg-client error when trying to deploy a file with permission 000. The BZ# mentioned in $subject were cloned to BZ#702535 and flipped Product to Satellite. Cheers, mmello -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Fri, 6 May 2011 00:39:56 -0300 Subject: [PATCH] 702524 - fixed the python error when trying to deploy an file with permission 000 using rhncfg-client --- client/tools/rhncfg/config_common/transactions.py |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py index de7a459..e55b337 100644 --- a/client/tools/rhncfg/config_common/transactions.py +++ b/client/tools/rhncfg/config_common/transactions.py @@ -142,9 +142,12 @@ class DeployTransaction: if file_info['filetype'] != 'symlink': os.chown(temp_file_path, uid, gid) -mode = '600' if file_info.has_key('filemode'): -mode = file_info['filemode'] +try: +if string.atoi(str(file_info['filemode']))> 0: +mode = file_info['filemode'] +except: +mode='600' mode = string.atoi(str(mode), 8) os.chmod(temp_file_path, mode) So, why is the default here set to '600' by default, not to that '000'? I don't like the exception logic as well -- why not something like (untested) mode = 0 if file_info.has_key('filemode'): try: mode = string.atoi(str(file_info['filemode'])) except ValueError: None ? From: Marcelo Moreira de Mello Date: Fri, 6 May 2011 11:26:21 -0300 Subject: [PATCH] 702524 - Fixed python traceback when deploying a file with permission set to 000 --- client/tools/rhncfg/config_common/transactions.py |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py index de7a459..44ffc60 100644 --- a/client/tools/rhncfg/config_common/transactions.py +++ b/client/tools/rhncfg/config_common/transactions.py @@ -144,7 +144,10 @@ class DeployTransaction: mode = '600' if file_info.has_key('filemode'): -mode = file_info['filemode'] +if file_info['filemode'] is "": +mode='000' +else: +mode = file_info['filemode'] mode = string.atoi(str(mode), 8) os.chmod(temp_file_path, mode) -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#702524 - rhncfg-client does not deploy an file when permission is set to 000 by webUI
Hello, This patch fixes the rhncfg-client error when trying to deploy a file with permission 000. The BZ# mentioned in $subject were cloned to BZ#702535 and flipped Product to Satellite. Cheers, mmello -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Fri, 6 May 2011 00:39:56 -0300 Subject: [PATCH] 702524 - fixed the python error when trying to deploy an file with permission 000 using rhncfg-client --- client/tools/rhncfg/config_common/transactions.py |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_common/transactions.py b/client/tools/rhncfg/config_common/transactions.py index de7a459..e55b337 100644 --- a/client/tools/rhncfg/config_common/transactions.py +++ b/client/tools/rhncfg/config_common/transactions.py @@ -142,9 +142,12 @@ class DeployTransaction: if file_info['filetype'] != 'symlink': os.chown(temp_file_path, uid, gid) -mode = '600' if file_info.has_key('filemode'): -mode = file_info['filemode'] +try: +if string.atoi(str(file_info['filemode'])) > 0: +mode = file_info['filemode'] +except: +mode='600' mode = string.atoi(str(mode), 8) os.chmod(temp_file_path, mode) -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#648868 - No such file `/etc/httpd/conf.d/rhn_proxy.conf'
Hello, This is a complementary patch for commit 8994dccc7d499e6acb4a14ab5f04d0bd468f191d which removes the files $HTTPDCONFD_DIR/proxy_redirect.conf and $HTTPDCONFD_DIR/proxy_broker.conf that also does not exists. [root@server ~]# echo $HTTPDCONFD_DIR /etc/httpd/conf.d [root@server ~]# ls -la $HTTPDCONFD_DIR/proxy_broker.conf ls: /etc/httpd/conf.d/proxy_broker.conf: No such file or directory [root@server ~]# $HTTPDCONFD_DIR/proxy_redirect.conf -bash: /etc/httpd/conf.d/proxy_redirect.conf: No such file or directory Thank you! Cheers, Marcelo -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Wed, 27 Apr 2011 09:55:53 -0300 Subject: [PATCH] 648868 - do not put proxy_broker.conf and proxy_redirect.conf to configuration channel --- proxy/installer/configure-proxy.sh |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/proxy/installer/configure-proxy.sh b/proxy/installer/configure-proxy.sh index b78ac52..75d857c 100755 --- a/proxy/installer/configure-proxy.sh +++ b/proxy/installer/configure-proxy.sh @@ -489,8 +489,6 @@ if [ "$POPULATE_CONFIG_CHANNEL" = "1" ]; then $SQUID_DIR/squid.conf \ $HTTPDCONFD_DIR/cobbler-proxy.conf \ $HTTPDCONF_DIR/httpd.conf \ -$HTTPDCONFD_DIR/proxy_broker.conf \ -$HTTPDCONFD_DIR/proxy_redirect.conf \ $JABBERD_DIR/c2s.xml \ $JABBERD_DIR/sm.xml fi -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#699966 - Add an option on rhncfg-manager to ignore missing local files
Hello Miroslav and Jan, Follow a better patch for BZ#699966 with --ignore-missing and a better logical flow. [root@dhcp96 ~]# rhncfg-manager update --channel=test2-channel --ignore-missing /etc/hosts /etc/shadow /etc/autofss /etc/group /etc/bunda Local file /etc/autofss does not exist. Ignoring file... Local file /etc/bunda does not exist. Ignoring file... Pushing to channel nega: Local file /etc/hosts -> remote file /etc/hosts Local file /etc/shadow -> remote file /etc/shadow Local file /etc/group -> remote file /etc/group Thank you for guidelines guys! Cheers, Marcelo On Wed, 2011-04-27 at 10:45 +0200, Miroslav Suchý wrote: > On 04/27/2011 07:46 AM, Marcelo Moreira de Mello wrote: > > Hello, > > > > This patch adds a new option in rhncfg-manager which allows to continue > > if local files were missing. > > > > Per example: > > > > [root@server ~]# rhncfg-manager update --help > > usage: rhncfg-manager update [options] file [ file ... ] > > > > options: > > -c CHANNEL, --channel=CHANNEL > > Upload files in this config channel > > -d DEST_FILE, --dest-file=DEST_FILE > > Upload the file as this path > > -t TOPDIR, --topdir=TOPDIR > > Make all files relative to this string > > --delim-start=DELIM_START > > Start delimiter for variable interpolation > > --delim-end=DELIM_END > > End delimiter for variable interpolation > > -f, --force Ignore errors if some local files does not exist > > -h, --helpshow this help message and exit > > > > [root@server ~]# rhncfg-manager update --channel=test-channel > > --force /etc/shadow /etc/autofss /etc/group /etc/no_exists > > Local file /etc/autofss does not exist. Ignoring file... > > Local file /etc/no_exists does not exist. Ignoring file... > > Pushing to channel test-channel: > > Local file /etc/shadow -> remote file /etc/shadow > > Local file /etc/group -> remote file /etc/group > > > > > > Cheers, > > Marcelo > > > > > > > > > > > > ___ > > Spacewalk-devel mailing list > > Spacewalk-devel@redhat.com > > https://www.redhat.com/mailman/listinfo/spacewalk-devel > > > I do not like this: > -if not os.path.exists(local_file): > -die(9, "No such file `%s'" % local_file) > +if self.options.force: > +if not os.path.exists(local_file): > +files_to_push.remove((local_file,remote_file)) > +print "Local file %s does not exist. Ignoring > file..." %(local_file) > +else: > +if not os.path.exists(local_file): > +die(9, "No such file `%s'" % local_file) > > I would rather use: > > if not os.path.exists(local_file): > if self.options.force: > files_to_push.remove((local_file,remote_file)) > print "Local file %s does not exist. Ignoring > else: > die(9, "No such file `%s'" % local_file) > > This is very similar, but you do not duplicate that line with: > os.path.exists(local_file) > also IMHO it better reflect the logical flow. > -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Wed, 27 Apr 2011 09:32:24 -0300 Subject: [PATCH] 699966 - added --ignore-missing option in rhncfg-manager to ignore missing local files when adding or uploading files --- .../tools/rhncfg/config_management/rhncfg_add.py | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/client/tools/rhncfg/config_management/rhncfg_add.py b/client/tools/rhncfg/config_management/rhncfg_add.py index 0795691..b88fbc1 100644 --- a/client/tools/rhncfg/config_management/rhncfg_add.py +++ b/client/tools/rhncfg/config_management/rhncfg_add.py @@ -44,6 +44,10 @@ class Handler(handler_base.HandlerBase): '--delim-end', action="store", help="End delimiter for variable interpolation", ), +handler_base.HandlerBase._option_class( +'-i', '--ignore-missing', action="store_true", + help="Ignore missing local files", + ), ] def run(self): @@ -96,7 +100,11 @@ class Handler(handler_base.HandlerBase): for (local_file, remote_file) in files_to_push: if not os.path.exists(local_file): -
Re: [Spacewalk-devel] [PATCH] - BZ#699966 - Add an option on rhncfg-manager to ignore missing local files
On Wed, 2011-04-27 at 09:51 +0200, Jan Pazdziora wrote: > On Wed, Apr 27, 2011 at 02:46:02AM -0300, Marcelo Moreira de Mello wrote: > > > > This patch adds a new option in rhncfg-manager which allows to continue > > if local files were missing. > > > > Per example: > > > > [root@server ~]# rhncfg-manager update --help > > usage: rhncfg-manager update [options] file [ file ... ] > > > > options: > > -c CHANNEL, --channel=CHANNEL > > Upload files in this config channel > > -d DEST_FILE, --dest-file=DEST_FILE > > Upload the file as this path > > -t TOPDIR, --topdir=TOPDIR > > Make all files relative to this string > > --delim-start=DELIM_START > > Start delimiter for variable interpolation > > --delim-end=DELIM_END > > End delimiter for variable interpolation > > -f, --force Ignore errors if some local files does not exist > > -h, --helpshow this help message and exit > > > > [root@server ~]# rhncfg-manager update --channel=test-channel > > --force /etc/shadow /etc/autofss /etc/group /etc/no_exists > > I don't like the --force. Could we have it names --ignore-missing > or --skip-missing or something similar? > Hey Jan, My first version I set --ignore-missing :) hehehe.. fixing it Cheers, Marcelo -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - BZ#699966 - Add an option on rhncfg-manager to ignore missing local files
On Wed, 2011-04-27 at 10:45 +0200, Miroslav Suchý wrote: > On 04/27/2011 07:46 AM, Marcelo Moreira de Mello wrote: > > Hello, > > > > This patch adds a new option in rhncfg-manager which allows to continue > > if local files were missing. > > > > Per example: > > > > [root@server ~]# rhncfg-manager update --help > > usage: rhncfg-manager update [options] file [ file ... ] > > > > options: > > -c CHANNEL, --channel=CHANNEL > > Upload files in this config channel > > -d DEST_FILE, --dest-file=DEST_FILE > > Upload the file as this path > > -t TOPDIR, --topdir=TOPDIR > > Make all files relative to this string > > --delim-start=DELIM_START > > Start delimiter for variable interpolation > > --delim-end=DELIM_END > > End delimiter for variable interpolation > > -f, --force Ignore errors if some local files does not exist > > -h, --helpshow this help message and exit > > > > [root@server ~]# rhncfg-manager update --channel=test-channel > > --force /etc/shadow /etc/autofss /etc/group /etc/no_exists > > Local file /etc/autofss does not exist. Ignoring file... > > Local file /etc/no_exists does not exist. Ignoring file... > > Pushing to channel test-channel: > > Local file /etc/shadow -> remote file /etc/shadow > > Local file /etc/group -> remote file /etc/group > > > > > > Cheers, > > Marcelo > > > > > > > > > > > > ___ > > Spacewalk-devel mailing list > > Spacewalk-devel@redhat.com > > https://www.redhat.com/mailman/listinfo/spacewalk-devel > > > I do not like this: > -if not os.path.exists(local_file): > -die(9, "No such file `%s'" % local_file) > +if self.options.force: > +if not os.path.exists(local_file): > +files_to_push.remove((local_file,remote_file)) > +print "Local file %s does not exist. Ignoring > file..." %(local_file) > +else: > +if not os.path.exists(local_file): > +die(9, "No such file `%s'" % local_file) > > I would rather use: > > if not os.path.exists(local_file): > if self.options.force: > files_to_push.remove((local_file,remote_file)) > print "Local file %s does not exist. Ignoring > else: > die(9, "No such file `%s'" % local_file) > > This is very similar, but you do not duplicate that line with: > os.path.exists(local_file) > also IMHO it better reflect the logical flow. > OK. Thanks for guide lines. I'm fixing it. Cheers, Marcelo -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#699966 - Add an option on rhncfg-manager to ignore missing local files
Hello, This patch adds a new option in rhncfg-manager which allows to continue if local files were missing. Per example: [root@server ~]# rhncfg-manager update --help usage: rhncfg-manager update [options] file [ file ... ] options: -c CHANNEL, --channel=CHANNEL Upload files in this config channel -d DEST_FILE, --dest-file=DEST_FILE Upload the file as this path -t TOPDIR, --topdir=TOPDIR Make all files relative to this string --delim-start=DELIM_START Start delimiter for variable interpolation --delim-end=DELIM_END End delimiter for variable interpolation -f, --force Ignore errors if some local files does not exist -h, --helpshow this help message and exit [root@server ~]# rhncfg-manager update --channel=test-channel --force /etc/shadow /etc/autofss /etc/group /etc/no_exists Local file /etc/autofss does not exist. Ignoring file... Local file /etc/no_exists does not exist. Ignoring file... Pushing to channel test-channel: Local file /etc/shadow -> remote file /etc/shadow Local file /etc/group -> remote file /etc/group Cheers, Marcelo -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Wed, 27 Apr 2011 02:40:34 -0300 Subject: [PATCH] 699966 - added --force option in rhncfg-manager to ignore missing local files when adding or uploading files --- .../tools/rhncfg/config_management/rhncfg_add.py | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_management/rhncfg_add.py b/client/tools/rhncfg/config_management/rhncfg_add.py index 0795691..3035615 100644 --- a/client/tools/rhncfg/config_management/rhncfg_add.py +++ b/client/tools/rhncfg/config_management/rhncfg_add.py @@ -44,6 +44,10 @@ class Handler(handler_base.HandlerBase): '--delim-end', action="store", help="End delimiter for variable interpolation", ), +handler_base.HandlerBase._option_class( +'-f', '--force', action="store_true", + help="Ignore errors if some local files does not exist", + ), ] def run(self): @@ -95,8 +99,13 @@ class Handler(handler_base.HandlerBase): files_to_push.append((f, f)) for (local_file, remote_file) in files_to_push: -if not os.path.exists(local_file): -die(9, "No such file `%s'" % local_file) +if self.options.force: +if not os.path.exists(local_file): +files_to_push.remove((local_file,remote_file)) +print "Local file %s does not exist. Ignoring file..." %(local_file) +else: +if not os.path.exists(local_file): +die(9, "No such file `%s'" % local_file) print "Pushing to channel %s:" % (channel, ) -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - bunch of fixes in pt_BR translations
Hello, This patch fixes a bunch of errors/typos in pt_BR translations. Cheers, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Fri, 15 Apr 2011 00:17:01 -0300 Subject: [PATCH] A bunch of fixes in pt_BR translation. --- .../frontend/strings/java/StringResource_pt_BR.xml |6 +- .../frontend/strings/jsp/StringResource_pt_BR.xml | 132 ++-- .../frontend/strings/nav/StringResource_pt_BR.xml |4 +- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 6617621..4aece8f 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -5819,7 +5819,7 @@ user before attempting to deactivate their account. All list pages that include a link to download list as CSV - Download da CSV + Download CSV Sort By This Column @@ -8537,7 +8537,7 @@ Follow this url to see the full list of inactive systems: /channels/manage/Edit - Os canais da Red Hat requerem previlégios de admin + Os canais da Red Hat requerem privilégios de admin Channel name must be at least {0} characters long @@ -8583,7 +8583,7 @@ Follow this url to see the full list of inactive systems: /channels/manage/Edit - Os canais da Red Hat requerem previlégios de admin + Os canais da Red Hat requerem privilégios de admin Channel label must be at least {0} characters long diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml index b629299..d778b56 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml @@ -74,7 +74,7 @@ /rhn/profiles/Details -Atualizado em +Atualizar @@ -501,19 +501,19 @@ Você não pode remover a função {0} do último {0}. You must be an organization administrator for a satellite to delete a user. -Você deve ser um administrador da empresa para um Satellite para remover um usuário. +Você deve ser um administrador da organização para remover um usuário. You must be an organization administrator to deactivate a user. Você deve ser um administrador da organização para desativar um usuário. You must be an organization administrator to reactivate a user. -Você deve ser um administrador da empresa para reativar um usuário. +Você deve ser um administrador da organização para reativar um usuário. You must be an organization administrator to view this page. Contact your organization administrator to get information on the users in this system. -Você deve ser um administrador da empresa para visualizar esta página. Contate o administrador de sua empresa para obter informações sobre os usuários deste sistema. +Você deve ser um administrador da organização para visualizar esta página. Contate o administrador de sua organização para obter informações sobre os usuários deste sistema. You must be an organization administrator to view information on users in this organization. -Você deve ser um administrador da empresa para visualizar as informações de usuários desta empresa. +Você deve ser um administrador da organização para visualizar as informações de usuários desta organização. You must be a configuration administrator to create new configuration file revisions. Você deve ser um administrador de configuração para criar novas revisões de arquivo de configuração. @@ -761,7 +761,7 @@ /rhn/kickstart/AdvancedModeCreate.do /rhn/channels/ChannelDetail - Atualizado em + Atualizar Create @@ -1714,13 +1714,13 @@ /rhn/users/ChannelManagementPerms - Abaixo encontra-se uma lista dos canais disponíveis à sua empresa. Você pode atribuir permissões específicas de administração a este usuário para cada um dos canais listados. + Abaixo encontra-se uma lista dos canais disponíveis à sua organização. Você pode atribuir permissões específicas de administração a este usuário para cada um dos canais listados. Management permission granted through org/channel admin
[Spacewalk-devel] PATCH 693889 - Updates status icon are not displayed in Chrome's browser due a error in html code
Hello, This patch fixes the update status icon which are not displayed when using Chrome Web Browser. The bugzilla is opened to Satellite, but the same issue happens in Spacewalk (nightly build) as well. Cheers, Marcelo -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Tue, 5 Apr 2011 17:30:03 -0300 Subject: [PATCH] 693889 - fix the update status icon not displayed in Chrome browser --- .../fragments/systems/group_listdisplay.jspf |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf b/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf index 21fa04c..209258b 100644 --- a/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf +++ b/java/code/webapp/WEB-INF/pages/common/fragments/systems/group_listdisplay.jspf @@ -29,7 +29,7 @@ styleclass="center" headerclass="thin-column"> - + " escapeXml="false"/> -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] PATCH - Added web.maximum_config_file_size option in man page for rhn.conf
Hello, This patch includes a new option web.maximum_config_file_size in rhn.conf man page. Cheers, -- Marcelo Moreira de Mello Red Hat Inc. From: Marcelo Moreira de Mello Date: Mon, 4 Apr 2011 16:24:02 -0300 Subject: [PATCH] Added web.maximum_config_file_size option in man page for rhn.conf --- spacewalk/config/usr/share/man/man5/rhn.conf.5 |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/spacewalk/config/usr/share/man/man5/rhn.conf.5 b/spacewalk/config/usr/share/man/man5/rhn.conf.5 index 69021c0..1998b57 100644 --- a/spacewalk/config/usr/share/man/man5/rhn.conf.5 +++ b/spacewalk/config/usr/share/man/man5/rhn.conf.5 @@ -218,6 +218,14 @@ If you enable the Monitoring Scout, you must also enable the Monitoring Backend. .B Default: 0 +.TP +.B "web.maximum_config_file_size" (bytes) +This parameter controls which is the maximum allowed size for configuration files. +.IP +.B Default: +32768 + + .SS Database Options .TP .B "db_backend" -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - BZ#688461 - Error when using the web UI to compare the differences between a file revision when SELinux is disabled in RHEL6
Hello, Following as attached a patch which fixes the python exception when comparing files using the web UI in RHEL6 when SELinux is disabled. The BZ# is flagged to RHN Satellite, but the same issue occurs in Spacewalk. Thank you. Kind Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 17 Mar 2011 12:11:38 -0300 Subject: [PATCH] rhbz#688461 - fixed python exception when comparing files using web UI and SELinux disabled in RHEL6 --- client/tools/rhncfg/config_common/file_utils.py |9 +++-- client/tools/rhncfg/config_common/repository.py |2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/tools/rhncfg/config_common/file_utils.py b/client/tools/rhncfg/config_common/file_utils.py index c506337..7d34884 100644 --- a/client/tools/rhncfg/config_common/file_utils.py +++ b/client/tools/rhncfg/config_common/file_utils.py @@ -19,7 +19,7 @@ import tempfile import base64 import difflib try: -from selinux import lgetfilecon +from selinux import lgetfilecon, is_selinux_enabled except: # on rhel4 we do not support selinux def lgetfilecon(path): @@ -97,9 +97,14 @@ class FileProcessor: sectx_result = '' result = '' -cur_sectx = lgetfilecon(path)[1] +if is_selinux_enabled(): +cur_sectx = lgetfilecon(path)[1] +else: +cur_sectx = None + if cur_sectx == None: cur_sectx = '' + if file_struct.has_key('selinux_ctx') and file_struct['selinux_ctx']: if cur_sectx != file_struct['selinux_ctx']: sectx_result = "SELinux contexts differ: actual: [%s], expected: [%s]\n" % (cur_sectx, file_struct['selinux_ctx']) diff --git a/client/tools/rhncfg/config_common/repository.py b/client/tools/rhncfg/config_common/repository.py index 65eda11..3a50da4 100644 --- a/client/tools/rhncfg/config_common/repository.py +++ b/client/tools/rhncfg/config_common/repository.py @@ -144,6 +144,8 @@ class Repository: if is_selinux_enabled(): ret['selinux_ctx'] = selinux_ctx +else: +ret['selinux_ctx'] = '' return ret -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Fixed-pt_BR-translations-issues-at-Kickstart-Create
Hello, Follow another pt_BR translation patch which fixes some "misunderstanding" when creating a kickstart. Thank you -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 3 Mar 2011 16:05:46 -0300 Subject: [PATCH] Fixed pt_BR translations issues at Kickstart Create Profile --- .../frontend/strings/jsp/StringResource_pt_BR.xml | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml index e6d99e4..b629299 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml @@ -5544,7 +5544,7 @@ value for this entitlement, excluding the default organization's consumption./rhn/systems/Proxy /rhn/systems/@@PRODUCT_NAME@@ - Convidado Virtual + Sistema Virtual Non-Virtual System @@ -12503,16 +12503,16 @@ o <strong>Guia de Administração de Sistemas Red Hat Enterprise Li Host de Virtualização Xen KVM Virtualized Guest -Convidado de Virtualização KVM +Sistema Virtualizado KVM None -Nada +Nenhum Xen Fully-Virtualized Guest -Covidado de Virtualização Completa Xen +Sistema Full-Virtualizado Xen Xen Para-Virtualized Guest -Convidado de Pára-Virtualização Xen +Sistema Para-Virtualizado Xen -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Fix some other pt_BR translation issues
Hello, I'm using Spacewalk Nightly Build and I using it in pt_BR to check the translation sanity and improve it. Below, a bunch of other improvements in pt_BR translation. Thank you. Kind Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Thu, 3 Mar 2011 00:21:06 -0300 Subject: [PATCH] Fixed some pt_BR translations issues --- .../frontend/strings/java/StringResource_pt_BR.xml |8 .../frontend/strings/jsp/StringResource_pt_BR.xml | 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 41f8b06..6617621 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -650,7 +650,7 @@ Navigation Menu - Gerencia Repositórios + Gerenciar Repositórios Monitoring @@ -944,7 +944,7 @@ Navigation Menu - Demonstra Registros Tomcat + Exibir log do Tomcat Terms & Conditions @@ -1593,7 +1593,7 @@ NOT USED - Ãltima Autenticação + Ãltimo Acesso Address Record: @@ -8207,7 +8207,7 @@ Follow this url to see the full list of inactive systems: Last Logged In - Ãltima Autenticação + Ãltimo Acesso Changed by First Name diff --git a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml index e6e87c3..72b1982 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/jsp/StringResource_pt_BR.xml @@ -877,7 +877,7 @@ /rhn/account/UserDetails - Ãltima Autenticação: + Ãltimo Acesso: Address Record: @@ -1057,7 +1057,7 @@ /rhn/users/UserPreferences - O @@PRODUCT_NAME@@ oferece os e-mails de notificação sempre que lançar erratas relevantes para seus sistemas, assim como os e-mails diários resumindo os eventos de seus sistemas. + O @@PRODUCT_NAME@@ oferece e-mails de notificação sempre que lançar erratas relevantes para seus sistemas, assim como os e-mails diários resumindo os eventos de seus sistemas. Receive email notifications @@ -2205,7 +2205,7 @@ abaixo e <b>não poderá mais se autenticar</b>. /rhn/users/UserDetails - Ãltima Autenticação + Ãltimo Acesso Change @@ -9478,7 +9478,7 @@ Please note that some manual configuration of these scripts may still be require Use repositories to sync additional packages to your channels. Repositories may be linked to your channels. -Use repositórios para sync pacotes adicionais aos seus canais. Os repositórios podem ser vinculados aos seus canais. +Use repositórios para sincronizar pacotes adicionais aos seus canais. Os repositórios podem ser vinculados aos seus canais. note here anote aqui @@ -12274,7 +12274,7 @@ o <strong>Guia de Administração de Sistemas Red Hat Enterprise Li Modify an existing software channel by selecting it from the list below, or create a new software channel. - Modificar um canal de software existente selecionando-o a partir da lista abaixo, ou criar um novo canal de software. + Para modificar um canal de software existente, selecione-o a partir da lista abaixo, ou crie um novo canal de software. create new channel -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - Added on rhn.conf man page a bunch of new options and fixed some typos.
Hello, Adding one more attachment fixing others typos. Please, apply use the files below (attached): 0001-Added-on-rhn.conf-man-page-a-bunch-of-new-options-an.patch 0002-Fixed-some-typos-in-man-page-for-rhn.conf.patch Thank you! Kind Regards, Marcelo Moreira de Mello On 03/01/2011 04:38 AM, Marcelo Moreira de Mello wrote: Hello, This patch adds a new documented options in rhn.conf man page and fix some typos. This also includes the some suggestions by Miroslav. Thank you. Kind Regards, Marcelo Moreira de Mello ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 1 Mar 2011 04:33:05 -0300 Subject: [PATCH 1/2] Added on rhn.conf man page a bunch of new options and fixed some typos. --- spacewalk/config/usr/share/man/man5/rhn.conf.5 | 124 1 files changed, 104 insertions(+), 20 deletions(-) diff --git a/spacewalk/config/usr/share/man/man5/rhn.conf.5 b/spacewalk/config/usr/share/man/man5/rhn.conf.5 index 1cd9950..fd5af55 100644 --- a/spacewalk/config/usr/share/man/man5/rhn.conf.5 +++ b/spacewalk/config/usr/share/man/man5/rhn.conf.5 @@ -8,20 +8,27 @@ rhn.conf \- Configuration file for Spacewalk/RHN Satellite Server .B /etc/rhn/rhn.conf .SH DESCRIPTION .B rhn.conf -is a configuration file for used for several services in Spacewalk/RHN Satellite server. -The file content are read by +is a configuration file used for several services in Spacewalk/RHN Satellite server. +The file contents are read by the .B rhn-satellite (8) command to start the Spacewalk/RHN Satellite service. .SH FORMAT .P -The format of /etc/rhn/rhn.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format below: +Format of /etc/rhn/rhn.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format below: .TP parameter = value .SH OPTIONS +.P +Spacewalk/RHN Satellite includes dozens other options in \fB/etc/rhn/default/*.conf\fR which administrator can override, +but \fB*** JUST CHANGE THOSE PARAMETERS IF YOU REALLY KNOW WHAT ARE YOU DOING! *** \fR + +.P +The most important tunables parameters in \fB/etc/rhn/rhn.conf\fR are listed below: + .TP .B "traceback_mail" Define which mail address will be used to notify about reports, warnings and Web traceback errors. -Use comma to separate mail addresses. +Use commas to separate mail addresses. .IP .B Default: none @@ -29,7 +36,7 @@ none .TP .B "mount_point" Define the directory used to store the RPM package files offered by software channels. -Per recommendation, we suggest at least 30 GB storage per software +As a recommendation, we suggest at least 30 GB storage per software channel (including Base and child channels). .IP .B Default: @@ -44,15 +51,15 @@ Define the directory used to store the kickstart trees. .TP .B "repomd_cache_mount_point" -Define the directory used to store the packages, errata, channels, kickstart-tree and repositories metadata -cache information generated when using Spacewalk/RHN Satellite, which get regenerated, as needed, if deleted. +Define the directory used to store the packages, errata, channels, kickstart trees and also store the repositories metadata +cache information. It is generated when using Spacewalk/RHN Satellite on demand when the client asks for thoses files. These cache files are stored in .B /var/cache/rhn and the storage needs of this directory will vary greatly. We suggest at least 10GB of space in .B /var/cache/rhn on Spacewalk/RHN Satellite server. Very large environments will need to increase the amount of space in .B /var/cache/rhn -directory. +that directory. .IP .B Default: @@ -60,7 +67,7 @@ directory. .TP .B "server.satellite.rhn_parent" -This parameter determines the parent RHN/RHN Satellite which packages will be downloaded or synced. This parameter usually points to RHN Hosted, +This parameter determines the parent RHN/RHN Satellite whose packages will be downloaded or synced. This parameter usually points to RHN Hosted, .B rhn.redhat.com .IP .B Default: @@ -68,7 +75,7 @@ none .TP .B "server.satellite.http_proxy" -This parameter determines the HTTP proxy used to download or sync packages. Enter the IP address or HTTP Proxy FQDN address. +This parameter determines the HTTP proxy used to download or sync packages from. Enter the IP address or HTTP Proxy FQDN address. .IP .B Default: none @@ -89,7 +96,7 @@ none .TP .B "server.satellite.ca_chain" -This parameter specify the SSL certi
[Spacewalk-devel] [PATCH] - Added on rhn.conf man page a bunch of new options and fixed some typos.
Hello, This patch adds a new documented options in rhn.conf man page and fix some typos. This also includes the some suggestions by Miroslav. Thank you. Kind Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From: Marcelo Moreira de Mello Date: Tue, 1 Mar 2011 04:33:05 -0300 Subject: [PATCH] Added on rhn.conf man page a bunch of new options and fixed some typos. --- spacewalk/config/usr/share/man/man5/rhn.conf.5 | 124 1 files changed, 104 insertions(+), 20 deletions(-) diff --git a/spacewalk/config/usr/share/man/man5/rhn.conf.5 b/spacewalk/config/usr/share/man/man5/rhn.conf.5 index 1cd9950..fd5af55 100644 --- a/spacewalk/config/usr/share/man/man5/rhn.conf.5 +++ b/spacewalk/config/usr/share/man/man5/rhn.conf.5 @@ -8,20 +8,27 @@ rhn.conf \- Configuration file for Spacewalk/RHN Satellite Server .B /etc/rhn/rhn.conf .SH DESCRIPTION .B rhn.conf -is a configuration file for used for several services in Spacewalk/RHN Satellite server. -The file content are read by +is a configuration file used for several services in Spacewalk/RHN Satellite server. +The file contents are read by the .B rhn-satellite (8) command to start the Spacewalk/RHN Satellite service. .SH FORMAT .P -The format of /etc/rhn/rhn.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format below: +Format of /etc/rhn/rhn.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format below: .TP parameter = value .SH OPTIONS +.P +Spacewalk/RHN Satellite includes dozens other options in \fB/etc/rhn/default/*.conf\fR which administrator can override, +but \fB*** JUST CHANGE THOSE PARAMETERS IF YOU REALLY KNOW WHAT ARE YOU DOING! *** \fR + +.P +The most important tunables parameters in \fB/etc/rhn/rhn.conf\fR are listed below: + .TP .B "traceback_mail" Define which mail address will be used to notify about reports, warnings and Web traceback errors. -Use comma to separate mail addresses. +Use commas to separate mail addresses. .IP .B Default: none @@ -29,7 +36,7 @@ none .TP .B "mount_point" Define the directory used to store the RPM package files offered by software channels. -Per recommendation, we suggest at least 30 GB storage per software +As a recommendation, we suggest at least 30 GB storage per software channel (including Base and child channels). .IP .B Default: @@ -44,15 +51,15 @@ Define the directory used to store the kickstart trees. .TP .B "repomd_cache_mount_point" -Define the directory used to store the packages, errata, channels, kickstart-tree and repositories metadata -cache information generated when using Spacewalk/RHN Satellite, which get regenerated, as needed, if deleted. +Define the directory used to store the packages, errata, channels, kickstart trees and also store the repositories metadata +cache information. It is generated when using Spacewalk/RHN Satellite on demand when the client asks for thoses files. These cache files are stored in .B /var/cache/rhn and the storage needs of this directory will vary greatly. We suggest at least 10GB of space in .B /var/cache/rhn on Spacewalk/RHN Satellite server. Very large environments will need to increase the amount of space in .B /var/cache/rhn -directory. +that directory. .IP .B Default: @@ -60,7 +67,7 @@ directory. .TP .B "server.satellite.rhn_parent" -This parameter determines the parent RHN/RHN Satellite which packages will be downloaded or synced. This parameter usually points to RHN Hosted, +This parameter determines the parent RHN/RHN Satellite whose packages will be downloaded or synced. This parameter usually points to RHN Hosted, .B rhn.redhat.com .IP .B Default: @@ -68,7 +75,7 @@ none .TP .B "server.satellite.http_proxy" -This parameter determines the HTTP proxy used to download or sync packages. Enter the IP address or HTTP Proxy FQDN address. +This parameter determines the HTTP proxy used to download or sync packages from. Enter the IP address or HTTP Proxy FQDN address. .IP .B Default: none @@ -89,7 +96,7 @@ none .TP .B "server.satellite.ca_chain" -This parameter specify the SSL certificate used in communication against +This parameter specify the SSL certificate used for communicationg with .B server.satellite.rhn_parent. The default SSL CA certificate points to RHN Hosted. .IP @@ -101,7 +108,8 @@ The default SSL CA certificate points to RHN Hosted. .P .RS This parameter determines debug level used by Spacewalk/RHN Satellite processes. -Please, keep in mind that raising up this value will generate a very verbose logs, which is only useful for debug. +Please, keep in
Re: [Spacewalk-devel] Bug 496823 - Add man page for rhn.conf
Hello, On 02/28/2011 05:08 AM, Miroslav Suchy wrote: Dne 28.2.2011 07:12, Marcelo Moreira de Mello napsal(a): Hello, Added as attachment the patch for BZ#496823 which includes the a man page for /etc/rhn/rhn.conf file. The patches are little malformed. The first line should not be there as I'm getting: $ git am /tmp/0001-Adding-usr-share-man-man5-rhn.conf.5-manpage-file.patch Patch format detection failed. I removed the first line, and then it applied cleanly. 0001-Adding-usr-share-man-man5-rhn.conf.5-manpage-file.patch Nice. I have several other suggestion. E.g. to document options: pam_auth_service enable_nvrea web.is_monitoring_backend web.is_monitoring_scout and mention that there is dozens other options in /etc/rhn/default/*.conf which you can override. With big warning, that you have to known what are you doing. But there is always place to improvements :) So commiting now. If you want to improve it more, send another patch. Sure! I will improve the man page and then send new patchs. Thx for suggestions! 0002-Modifing-SPEC-file-including-new-man-page.patch I did not applied this one. 1) do not put changelog entried in patch. Changelog entries are automatically generated when someone call 'tito tag'. And it does more thing then just generating changelog entries. 2) There is no need to gzip man page. RPM will do that automatically. So this diff is sufficient: +%doc %{_prefix}/share/man/man5/rhn.conf.5* I commited this one line on my own. Ehm and when I'm writing this email I realized that you should use %{_mandir} instead of %{_prefix}/share/man. But this is minor. Thanks for guidelines. Thanks for contributing. Thank you. Mirek Suchy ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
Re: [Spacewalk-devel] [PATCH] - Translation fix on pt_BR at java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml
Hello, Resending the patch follow the Spacewalk git guide lines. 0001-Small-fix-on-pt_BR-translations.patch Please, prefer this mail. Kind Regards, Marcelo Moreira de Mello On 02/27/2011 09:24 PM, Marcelo Moreira de Mello wrote: Hello, This is a small patch to fix Brazilian Portuguese translation in java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml Fixed the charset error on the prio attachment. Thank you. Kind Regards, ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 From aa159c2fe08dcd0e8c4f9033cbae82a0699d528f Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Mon, 28 Feb 2011 03:29:56 -0300 Subject: [PATCH] Small fix on pt_BR translations --- .../frontend/strings/java/StringResource_pt_BR.xml |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 81f4230..41f8b06 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -1353,7 +1353,7 @@ /rhn/users/CreateUser - O login requisitado é muito longo. Por favor, indique um login mais curto e tente novamente. + O nome de usuário é muito longo. Por favor, indique um nome de usuário mais curto e tente novamente. Passwords must be at least {0} characters. @@ -1375,7 +1375,7 @@ /rhn/users/CreateUser - A senha indicada é muito longa. Por favor, indique uma senha mais curta e tente novamente. + A senha informada é muito longa. Por favor, indique uma senha mais curta e tente novamente. Passwords do not match. @@ -8031,11 +8031,11 @@ Follow this url to see the full list of inactive systems: The requested file is too large to download over XMLRPC. - O arquivo requisitado é muito grande para ser baixado sob o XMLRPC. + O arquivo solicitado é muito grande para ser baixado sob o XMLRPC. There was a general IO Error, check permissions on the requested file. - Ocorreu um Erro de E/S, verifique as permissões no arquivo requisitado. + Ocorreu um Erro de E/S, verifique as permissões no arquivo solicitado. Access value, "{0}". Please use one of the following: "public", "private", or "protected". -- 1.7.1 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] Bug 496823 - Add man page for rhn.conf
Hello, Added as attachment the patch for BZ#496823 which includes the a man page for /etc/rhn/rhn.conf file. 0001-Adding-usr-share-man-man5-rhn.conf.5-manpage-file.patch 0002-Modifing-SPEC-file-including-new-man-page.patch Please, review the patch. Please, let me know if we need to change something. Thank you so much. Kind Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 >From 09eff4477401399c73bad357c1e92f65fb63cd8d Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Mon, 28 Feb 2011 02:50:07 -0300 Subject: [PATCH 1/2] Adding usr/share/man/man5/rhn.conf.5 manpage file --- spacewalk/config/usr/share/man/man5/rhn.conf.5 | 253 1 files changed, 253 insertions(+), 0 deletions(-) create mode 100644 spacewalk/config/usr/share/man/man5/rhn.conf.5 diff --git a/spacewalk/config/usr/share/man/man5/rhn.conf.5 b/spacewalk/config/usr/share/man/man5/rhn.conf.5 new file mode 100644 index 000..3d3f427 --- /dev/null +++ b/spacewalk/config/usr/share/man/man5/rhn.conf.5 @@ -0,0 +1,253 @@ +.\" Process this file with +.\" groff -man -Tascii foo.1 +.\" +.TH rhn.conf 5 "1 March 2011" Linux "File Formats and Conventions" +.SH NAME +rhn.conf \- Configuration file for Spacewalk/RHN Satellite Server +.SH SYNOPSIS +.B /etc/rhn/rhn.conf +.SH DESCRIPTION +.B rhn.conf +is a configuration file for used for several services in Spacewalk/RHN Satellite server. +The file content are read by +.B rhn-satellite (8) +command to start the Spacewalk/RHN Satellite service. +.SH FORMAT +.P +The format of /etc/rhn/rhn.conf is very simple. Each line is either a comment or a directive. Comment lines start with a # and are ignored. A directive line has the format below: +.TP +parameter = value +.SH OPTIONS +.TP +.B "traceback_mail" +Define which mail address will be used to notify about reports, warnings and Web traceback errors. +Use comma to separate mail addresses. +.IP +.B Default: +none + +.TP +.B "mount_point" +Define the directory used to store the RPM package files offered by software channels. +Per recommendation, we suggest at least 30 GB storage per software +channel (including Base and child channels). +.IP +.B Default: +/var/satellite + +.TP +.B "kickstart_mount_point" +Define the directory used to store the kickstart trees. +.IP +.B Default: +/var/satellite + +.TP +.B "repomd_cache_mount_point" +Define the directory used to store the packages, errata, channels, kickstart-tree and repositories metadata +cache information generated when using Spacewalk/RHN Satellite, which get regenerated, as needed, if deleted. +These cache files are stored in +.B /var/cache/rhn +and the storage needs of this directory will vary greatly. We suggest at least 10GB of space in +.B /var/cache/rhn +on Spacewalk/RHN Satellite server. Very large environments will need to increase the amount of space in +.B /var/cache/rhn +directory. + +.IP +.B Default: +/var/cache + +.TP +.B "server.satellite.rhn_parent" +This parameter determines the parent RHN/RHN Satellite which packages will be downloaded or synced. This parameter usually points to RHN Hosted, +.B rhn.redhat.com +.IP +.B Default: +none + +.TP +.B "server.satellite.http_proxy" +This parameter determines the HTTP proxy used to download or sync packages. Enter the IP address or HTTP Proxy FQDN address. +.IP +.B Default: +none + +.TP +.B "server.satellite.http_proxy_username" +This parameter determines the HTTP proxy username. +.IP +.B Default: +none + +.TP +.B "server.satellite.http_proxy_password" +This parameter determines the HTTP proxy password. +.IP +.B Default: +none + +.TP +.B "server.satellite.ca_chain" +This parameter specify the SSL certificate used in communication against +.B server.satellite.rhn_parent. +The default SSL CA certificate points to RHN Hosted. +.IP +.B Default: +/usr/share/rhn/RHNS-CA-CERT + +.TP +.B "debug" +.P +.RS +This parameter determines debug level used by Spacewalk/RHN Satellite processes. +Please, keep in mind that raising up this value will generate a very verbose logs, which is only useful for debug. +.B Use it carefully! +Valid values: +.B [0-6] +.RE +.B +.P +.RS +0 low verbosity +.RE +.RS +6 high verbosity +.RE +.IP +.B Default: +1 + +.TP +.B "disconnected (boolean)" +This parameter controls if server is running in connected or disconnected mode. +When running in disconnected mode, the RHN Entitlement Certificate is activated locally +but not on remote RHN Servers. To switch to connected mode, see man page +.B rhn-satellite-activate (8). +.IP +.B Default: +0 + +.TP +.B "enable_snapshots" +This parameter controls if server is allow system snapshots. +.IP +.B Default:
[Spacewalk-devel] [PATCH] - Translation fix on pt_BR at java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml
Hello, This is a small patch to fix Brazilian Portuguese translation in java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml Fixed the charset error on the prio attachment. Thank you. Kind Regards, -- Marcelo Moreira de Mello Small patch to fix Brazilian Portuguese translation in java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml Signed-off-by: Marcelo Moreira de Mello diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 81f4230..41f8b06 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -1353,7 +1353,7 @@ /rhn/users/CreateUser - O login requisitado é muito longo. Por favor, indique um login mais curto e tente novamente. + O nome de usuário é muito longo. Por favor, indique um nome de usuário mais curto e tente novamente. Passwords must be at least {0} characters. @@ -1375,7 +1375,7 @@ /rhn/users/CreateUser - A senha indicada é muito longa. Por favor, indique uma senha mais curta e tente novamente. + A senha informada é muito longa. Por favor, indique uma senha mais curta e tente novamente. Passwords do not match. @@ -8031,11 +8031,11 @@ Follow this url to see the full list of inactive systems: The requested file is too large to download over XMLRPC. - O arquivo requisitado é muito grande para ser baixado sob o XMLRPC. + O arquivo solicitado é muito grande para ser baixado sob o XMLRPC. There was a general IO Error, check permissions on the requested file. - Ocorreu um Erro de E/S, verifique as permissões no arquivo requisitado. + Ocorreu um Erro de E/S, verifique as permissões no arquivo solicitado. Access value, "{0}". Please use one of the following: "public", "private", or "protected". ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - Translation fix on pt_BR at java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml
Hello, This is a small patch to fix Brazilian Portuguese translation in java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml Thank you. Kind Regards, Marcelo Moreira de Mello -- Marcelo Moreira de Mello Small patch to fix Brazilian Portuguese translation in java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml Signed-off-by: Marcelo Moreira de Mello diff --git a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml index 81f4230..41f8b06 100644 --- a/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml +++ b/java/code/src/com/redhat/rhn/frontend/strings/java/StringResource_pt_BR.xml @@ -1353,7 +1353,7 @@ /rhn/users/CreateUser - O login requisitado é muito longo. Por favor, indique um login mais curto e tente novamente. + O nome de usuário é muito longo. Por favor, indique um nome de usuário mais curto e tente novamente. Passwords must be at least {0} characters. @@ -1375,7 +1375,7 @@ /rhn/users/CreateUser - A senha indicada é muito longa. Por favor, indique uma senha mais curta e tente novamente. + A senha informada é muito longa. Por favor, indique uma senha mais curta e tente novamente. Passwords do not match. @@ -8031,11 +8031,11 @@ Follow this url to see the full list of inactive systems: The requested file is too large to download over XMLRPC. - O arquivo requisitado é muito grande para ser baixado sob o XMLRPC. + O arquivo solicitado é muito grande para ser baixado sob o XMLRPC. There was a general IO Error, check permissions on the requested file. - Ocorreu um Erro de E/S, verifique as permissões no arquivo requisitado. + Ocorreu um Erro de E/S, verifique as permissões no arquivo solicitado. Access value, "{0}". Please use one of the following: "public", "private", or "protected". ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - fix typo in spacewalk-koan/spacewalkkoan/spacewalkkoan.py
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, This proposed patch fixed a typo when importing subprocess module in spacewalkkoan.py Kind Regards, Marcelo Moreira de Mello - -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG http://people.redhat.com/mdemello Mobile: +55 11 9321-0854 gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNQh09AAoJEL1C0JX9sRDlBL0H/iLsMtVvE7F66e1ZAhwXL40W cnr8+Gkgqi7Dr7wAnjhs14bhZ11drPySH5Peq4zu4HeYX0WEbdoohBlbzPXolxpV 9MYKC6knHKAEH9hcCs2uOujWOVI+3+Vpp0AJ6sb4D22Clp8nUO3mZD5hlZyAAArU IA0O1v0hN8PTtlhadf/oLWm35oKCut1UkkDAu0FndUZrDmCG0pBaPd75RZvx68wj YNGOeE3QYjIrHbXNATFPfVksH62y982aMZ/HzkE6fjq+mojY10E74eoooUuvG7ap H+sCzznrut8AzQqwCCnc7xNTU3AEGeY5YhX614MvGfS6uKYhFbGTBseb5RhmR28= =3C0m -END PGP SIGNATURE- Fixed typo in import subprocess Signed-off-by: Marcelo Moreira de Mello diff --git a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py index 0abfa0a..efaae45 100644 --- a/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py +++ b/client/tools/spacewalk-koan/spacewalkkoan/spacewalkkoan.py @@ -276,7 +276,7 @@ def my_popen(cmd): subproc = 1 try: -import subproccess +import subprocess except ImportError: #RHEL 4 (python 2.3) doesn't have subprocess import popen2 ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel
[Spacewalk-devel] [PATCH] - spacewalk-repo-sync ignores http proxy settings
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, Follow a patch to honor proxy_configuration in /etc/rhn/rhn.conf for spacewalk-repo-sync. There is a BZ#657091 opened for that (Satellite) Best Regards, Marcelo Moreira de Mello - -- Marcelo Moreira de Mello RHCA RHCSS RHCVA Software Maintenance Engineer/SEG http://people.redhat.com/mdemello Mobile: +55 11 9321-0854 gpg id: 2048R/FDB110E5 gpg fingerprint: 3BE7 EF71 4DD7 6812 D309 8F18 BD42 D095 FDB1 10E5 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNOc/EAAoJEL1C0JX9sRDlUskIAJt4ss4oCr102muTxB1faxgL plUIBstRtoKIEBfVapH5E/UEsUpVlbHna9EqmgamUusDP7AOAdDfTr40Nt4QutKg KLsUn6mWUA0TmoGXUN6RxKj8Ukjhxc52mGOyUpOYjvkYJpLYeJ1RMANRd6Bti1Rg JbDbQSGWOXqPp/YuCHpNZIHdH3QyqMEcSZQ4g0OIKjcCZlJ4Z7xe78/GuuiSB00k aErdQaQ6zK6HYVPJ0D/V1Fy8tbQM3mYqHbmk0EMHI7E7W5PiFHXV/HQdkVAVwgFo fkFd206GNs1xGWkkPzHBuI/LfPwLbDAcNwpwvsjEdLlU1IFswbySQXU7ggRB5Vs= =Nkbv -END PGP SIGNATURE- Signed-off-by: Marcelo Moreira de Mello --- backend/satellite_tools/repo_plugins/yum_src.py | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/backend/satellite_tools/repo_plugins/yum_src.py b/backend/satellite_tools/repo_plugins/yum_src.py index 12f44a7..48ad4a1 100644 --- a/backend/satellite_tools/repo_plugins/yum_src.py +++ b/backend/satellite_tools/repo_plugins/yum_src.py @@ -17,6 +17,9 @@ import shutil import sys from spacewalk.satellite_tools.reposync import ContentPackage +sys.path.append("/usr/share/rhn/") +from common import CFG, initCFG + class YumWarnings: def write(self, s): pass @@ -35,6 +38,17 @@ class ContentSource: self.url = url self.name = name self._clean_cache(self.cache_dir + name) + +# read the proxy configuration in /etc/rhn/rhn.conf +initCFG('server.satellite') +self.proxy_addr = CFG.http_proxy +self.proxy_user = CFG.http_proxy_username +self.proxy_pass = CFG.http_proxy_password + +if (self.proxy_user is not None and self.proxy_pass is not None and self.proxy_addr is not None): +self.proxies = "http://%s:%s@%s"; %(self.proxy_user, self.proxy_pass, self.proxy_addr) +elif (self.proxy_addr is not None): +self.proxies = "http://%s"; %(self.proxy_addr) def list_packages(self): """ list packages""" @@ -45,6 +59,8 @@ class ContentSource: repo.mirrorlist = self.url repo.baseurl = [self.url] repo.basecachedir = self.cache_dir +if self.proxies is not None: +repo.proxy = self.proxies warnings = YumWarnings() warnings.disable() ___ Spacewalk-devel mailing list Spacewalk-devel@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-devel