Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1523947

Summary: While running foreman-maintain it fails with "Illegal quoting in line 3."
Product: Red Hat Satellite Reporter: Shivdutt Bharadwaj <shbharad>
Component: Satellite MaintainAssignee: Anurag Patel <apatel>
Status: CLOSED CURRENTRELEASE QA Contact: Nikhil Kathole <nkathole>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.0CC: apatel, bkearney, inecas, jentrena, kgaikwad, mmccune, nkathole
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-05 16:20:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1496794    

Description Shivdutt Bharadwaj 2017-12-09 11:16:30 UTC
Description of problem:

# foreman-maintain upgrade run  --target-version 6.2.z --whitelist="disk-io" --phase pre_migrations 
Running Procedures before migrating to Satellite 6.2.z
================================================================================
Turn on maintenance mode:                                             [OK]
--------------------------------------------------------------------------------
disable active sync plans: 
/ disabling sync plans                                                [FAIL]    
Illegal quoting in line 3.
--------------------------------------------------------------------------------
Scenario [Procedures before migrating to Satellite 6.2.z] failed.

The following steps ended up in failing state:

  [sync-plans-disable]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="sync-plans-disable"



Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.0.11-1.el7sat

Comment 6 Kavita 2018-05-28 07:36:04 UTC
This issue is fixed in latest build of foreman-maintain i.e rubygem-foreman_maintain-0.2.2-1.el7sat.noarch

With this change before any DB query, it verifies a DB connection first. 
So modifying BZ status to ON_QA to verify.

If this issue still persists then please feel free to reopen this issue.

Comment 9 Nikhil Kathole 2018-08-07 13:23:44 UTC
VERIFIED

Version tested:
# rpm -qa | grep maintain
rubygem-foreman_maintain-0.2.6-1.el7sat.noarch

Steps:
1. katello-service stop
2. # foreman-maintain upgrade run --phase pre_migrations --target-version 6.4 --whitelist="hammer-setup"


--------------------------------------------------------------------------------
disable active sync plans: 
/ disabling sync plans                                                [FAIL]    
Please check whether database service is up & running state.
--------------------------------------------------------------------------------
Scenario [Procedures before migrating to Satellite 6.4] failed.

The following steps ended up in failing state:

  [sync-plans-disable]

Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="sync-plans-disable"

Comment 12 Bryan Kearney 2020-03-05 16:20:25 UTC
The current version of foreman_maintain includes this fix.