This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 963230 - rhn-satellite-activate does not modify "disconnected" flag in /etc/rhn/rhn.conf.
rhn-satellite-activate does not modify "disconnected" flag in /etc/rhn/rhn....
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
1.9
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
:
Depends On:
Blocks: space20
  Show dependency treegraph
 
Reported: 2013-05-15 08:51 EDT by Dimitar Yordanov
Modified: 2013-08-02 09:10 EDT (History)
1 user (show)

See Also:
Fixed In Version: spacewalk-backend-1.10.32-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-02 09:10:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dimitar Yordanov 2013-05-15 08:51:17 EDT
Description of problem:
 When Spacewalk is installed as disconnected "disconnected" flag is set to 1 in /etc/rhn/rhn.conf.
 In case Spacewalk is afterwards activated against rhn.redhat.com with the help of rhn-satellite-activate  "disconnected=1"  will not be modified in /etc/rhn/rhn.conf and satelite-sync will fail to sync a channel.

Version-Release number of selected component (if applicable):
spacewalk-backend-tools-1.7.38-2

How reproducible:
100%

Steps to Reproduce:
1. Install Spacewalk as disconnected 
     spacewalk-setup --answer-file=/tmp/answers.txt --disconnected

2. Activate Spacewalk to rhn.redhat.com
    rhn-satellite-activate --ignore-version-mismatch

3. Try to sync a channel from rhn.redhat.com
  18:54:58 Red Hat Network Satellite - live synchronization
  18:54:58 ERROR: Can't use live synchronization in disconnected mode.
  # satellite-sync -c rhel-x86_64-server-6 --no-packages  --no-errata --no-kickstarts


Additional info:
[spacewalk{master}]$ git show 1bf057e0
commit 1bf057e0c697c66c604287b9eba9a2b0e33969db
Author: Michael Mraka <michael.mraka@redhat.com>
Date:   Fri May 10 13:43:04 2013 +0200

    888378 - print nice error message in disconnected mode

diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index d075a3d..11fd76b 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -434,9 +434,13 @@ class Syncer:
                 sync_parent = CFG.ISS_PARENT
                 self.systemid = 'N/A'   # systemid is not used in ISS auth process
                 is_iss = 1
-            else:
+            elif not CFG.DISCONNECTED:
                 sync_parent = CFG.RHN_PARENT
                 is_iss = 0
+            else:
+                log(1, _('Red Hat Network Satellite - live synchronization'))
+                log(-1, _("ERROR: Can't use live synchronization in disconnected mode."), stream=sys.stderr)
+                sys.exit(1)
 
             url = self.xmlDataServer.schemeAndUrl(sync_parent)
             log(1, [_('Red Hat Network Satellite - live synchronization'),
Comment 1 Dimitar Yordanov 2013-05-16 07:28:42 EDT
The Step 2 in the reproducer will fail as well.
This is a regression against Satellite 5.6 Beta.

# rhn-satellite-activate --rhn-cert=redhat-internal-sputnik.cert-5.5.cert 
RHN_PARENT: satellite.rhn.redhat.com
Population of the Channel Family permissions failed.
Return value: 1
Standard-out: 06:26:27 Red Hat Network Satellite - live synchronization

Standard-error: 06:26:27 ERROR: Can't use live synchronization in disconnected mode.

ERROR: Population of the Channel Family permissions failed.
Comment 2 Michael Mráka 2013-05-17 08:58:45 EDT
Warn user when activating disconnected satellite remotely:

Fixed in spacewalk master by
commit d0d7723c27fb03422b4c833af641d29ac7f02eb7
    963230 - remote activation in disconnected mode is not valid
Comment 3 Tomáš Kašpárek 2013-08-02 09:10:36 EDT
Fix for this bug is present in Spacewalk 2.0, closing this bug as CURRENTRELEASE.

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