Bug 1514206 - mongoexport unusable: "panic: error setting command line options for querying"
Summary: mongoexport unusable: "panic: error setting command line options for querying"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mongo-tools
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Marek Skalický
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-16 19:46 UTC by Matt McCutchen
Modified: 2018-12-04 02:22 UTC (History)
8 users (show)

Fixed In Version: mongo-tools-3.4.13-1.fc27 mongo-tools-3.6.6-1.20181124gitbd441aa.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-04 02:22:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matt McCutchen 2017-11-16 19:46:55 UTC
Description of problem:
The mongoexport tool is unusable: any invocation exits with an error during startup.

Previously mentioned in bug 1423959 comment 8.

Version-Release number of selected component (if applicable):
mongo-tools-3.2.1-0.6.git17a5573.fc26.x86_64

How reproducible:
Always

Steps to Reproduce:
1. mongoexport --help

Actual results:
panic: error setting command line options for  querying: boolean flag `-k/slaveOk' may not have default values, they always default to `false' and can only be turned on

goroutine 1 [running]:
github.com/mongodb/mongo-tools/common/options.(*ToolOptions).AddOptions(0xc420108280, 0x5eae99e629a0, 0xc4201241e0)
	/builddir/build/BUILD/mongo-tools-17a5573551a0c3e33603f98375f144f1dd20b745/src/github.com/mongodb/mongo-tools/common/options/options.go:287 +0x269
main.main()
	/builddir/build/BUILD/mongo-tools-17a5573551a0c3e33603f98375f144f1dd20b745/mongoexport/main/mongoexport.go:25 +0x129

Expected results:
Help message.

Additional info:
mongo-tools-3.2.1-0.4.git17a5573.fc25.x86_64 does not have the problem.  Presumably the change in behavior for the same revision of the mongo-tools source is because the working package is statically linked against golang-github-jessevdk-go-flags-devel-0-0.5.git5e11878.fc24.noarch.rpm while the broken package is statically linked against golang-github-jessevdk-go-flags-devel-0-0.8.gitf2785f5.fc26.noarch.rpm:

https://koji.fedoraproject.org/koji/rpmlist?buildrootID=6070527%20&start=50&order=nvr&type=component
https://koji.fedoraproject.org/koji/rpmlist?buildrootID=8602497%20&start=50&order=nvr&type=component

Indeed, the error message in golang-github-jessevdk-go-flags that is showing up was added between these revisions:

https://github.com/jessevdk/go-flags/compare/5e11878...f2785f5#diff-103d48dbdf9e16c6eb09b90668a9e984R280

I haven't researched the situation upstream (e.g., whether the latest upstream revisions of mongo-tools and golang-github-jessevdk-go-flags work together) or what might be a reasonable solution for Fedora.  For now, I'll use the Fedora 25 package.

Comment 1 Artem Hluvchynskyi 2018-02-12 11:55:33 UTC
Same issue in Fedora 27 and mongo-tools-3.2.1-0.6.git17a5573.fc27. Currently unusable.

I've built it from upstream source master and that works fine.

Comment 2 Tim Niemueller 2018-02-22 12:28:00 UTC
Just ran into this. Would be nice to get this fixed soon.

Comment 3 Fedora Update System 2018-03-08 13:17:22 UTC
mongo-tools-3.4.13-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5d7c270b26

Comment 4 Fedora Update System 2018-03-08 16:24:07 UTC
mongo-tools-3.4.13-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5d7c270b26

Comment 5 Fedora Update System 2018-03-20 10:38:44 UTC
mongo-tools-3.6.3-0.2.20180319git2b10d84.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0c253fb84f

Comment 6 Fedora Update System 2018-03-20 14:54:55 UTC
mongo-tools-3.6.3-0.2.20180319git2b10d84.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0c253fb84f

Comment 7 Fedora Update System 2018-03-20 18:19:00 UTC
mongo-tools-3.4.13-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Piotr Popieluch 2018-05-23 14:09:49 UTC
I'm hitting this issue on f28.

Seems that the update for f28 is unpushed and now is on an older version than 27. Any change to get it updated on f28?

Comment 9 Tim Niemueller 2018-05-24 06:45:19 UTC
I just hit the same "surprise". Why was the update unpushed?

Comment 10 Marek Skalický 2018-05-29 11:18:55 UTC
It wasn't able to get updated mongo-tools into F28 because new golang macros introduced new automatic rpm requirement addition and there is unsatisfied requirement on escaper.

After review https://bugzilla.redhat.com/show_bug.cgi?id=1583608 is done, there should be no other problem for mongo-tools

Comment 11 Jan Chaloupka 2018-05-29 11:21:17 UTC
You can filter out the new requirement if it is needed only by the tests. Resp, you don't have to use the new macros. They are still optional, yet recommended.

Comment 12 Tom Dalbo 2018-08-07 15:27:20 UTC
Following up on this, as it still seems to be broken in F28.  It looks like the bug referenced has been merged, so the resolution for this shouldn't be blocked anymore, right?

Comment 13 Leam 2018-09-06 00:21:18 UTC
A current (2018-09-05) dnf install of mongo-tools gets version:  

mongo-tools-3.2.1-0.6.git17a5573.fc27.x86_64

Which still has the issue.

Comment 14 Fedora Update System 2018-11-24 19:45:31 UTC
mongo-tools-3.6.6-1.20181124gitbd441aa.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-916523c108

Comment 15 Fedora Update System 2018-11-25 04:09:10 UTC
mongo-tools-3.6.6-1.20181124gitbd441aa.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-916523c108

Comment 16 Fedora Update System 2018-12-04 02:22:45 UTC
mongo-tools-3.6.6-1.20181124gitbd441aa.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


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