Bug 1368480

Summary: postgresql-setup ignores parameter value when setting "upgrading from redhat server"
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: postgresqlAssignee: Pavel Raiskup <praiskup>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 24CC: devrim, hhorak, jmlich83, jstanek, pkajaba, pkubat, praiskup, tgl
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 06:51:06 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:
Attachments:
Description Flags
Patch for postgresql-setup.in to handle redhat_seckets_hack correct. none

Description Edgar Hoch 2016-08-19 14:09:56 UTC
Created attachment 1192150 [details]
Patch for postgresql-setup.in to handle redhat_seckets_hack correct.

Description of problem:

There is an error in /usr/bin/postgresql-setup when it decides whether "upgrading from redhat server". The value of the parameter is ignored, it can be "yes" or "no", but the script checks only if the parameter is not empty.

I provide a patch that solves the problem.


Version-Release number of selected component (if applicable):
postgresql-9.5.4-1.fc24.x86_64
postgresql-server-9.5.4-1.fc24.x86_64
postgresql-upgrade-9.5.4-1.fc24.x86_64

How reproducible:
Always

Comment 1 Pavel Raiskup 2016-08-22 04:20:02 UTC
You are right again, thanks for the patch, I'll apply this.  Misinterpreting
the yes/no value should not cause big troubles as the exported shell variable
is used only by patched PostgreSQL in RHSCL.

I'm curious, have you been affected by this issue?

Comment 2 Edgar Hoch 2016-08-22 04:40:23 UTC
(In reply to Pavel Raiskup from comment #1)
> I'm curious, have you been affected by this issue?

No, I'm not affected. I was searching for the reason why postgresql-setup has failed, and one try was to correct this. But this did not solve the failed script. Later I found the reason described in bug #1368477.

But I had already a patch for the wrong code, so I thought it is worth to report it so it can be corrected for other users.

Comment 3 Pavel Raiskup 2016-09-02 08:49:11 UTC
Applied upstream:
https://github.com/devexp-db/postgresql-setup/commit/82abbb0ec7d19

Comment 4 Pavel Raiskup 2017-01-18 06:51:06 UTC
As Edgar is not affected and this is fixed in Rawhide (setup_version 5.0),
I'm closing this bugreport.  Thanks again!