-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Credhub set using version cli 2.0.0 to server 1.7 fails. #50
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/159673658 The labels on this github issue will be updated when the story is started. |
Thanks @jmcdice for your submission. The story to fix this is currently in flight. You can follow along here: https://www.pivotaltracker.com/story/show/160565578 |
Um, that story is focused on backward compatibility. The OP here describes a clear bug - I'm not sure how that can be considered anything except a serious bug? Am I misunderstanding? We've just burned an afternoon on this. It's frustrating to find a 2 month old bug on it that seems stalled pending a broader issue. ie while backwards compatibility is a fine goal, a quick fix to fail fast would surely be far more appropriate than the current fail slow behaviour? |
@aeijdenberg sorry to hear you spent so much time on this issue! I totally agree that this is a bug. But our fix for it is to have our new CLI check the version of the server that you are targeting, and based on that send the correct request. The problem is that the new behavior of the 2.0.0 server removes the no-overwrite mode from credential setting and makes the default behavior to overwrite the existing credential if a set request is received. You are using the old server with the new cli. The new cli never sends the overwrite flag (like it did in the old CLI) so the old server is not updating your credentials. The new cli and the old server are not compatible with each other as documented in our CLI release notes. Once the above story that I linked is done, they will be compatible again. |
@athornton2012 - my issue is that CredHub is being used a database, and as it stands either the CLI or the server is claiming that an update command succeeds, that in fact fails. That's pretty much the worst possible failure mode for any type of database and it leads to incorrect data being stored. The statement in the release notes is misleading. In nearly any other system a statement like:
Implies that an operation will fail if they are not compatible. It goes completely against the principle of least surprise that an "incompatible" operation can return a success code. In our case, I had read that notice, and was pretty sure our server was v2.0.0, so we just deployed it, expecting our test environment would produce a failure if I was wrong and they were not compatible. Instead all our automation succeeded - yet data was not updated in our database. We have a number of different systems using CredHub - and we have a number of automation systems that will use the CLI (and some the raw API) for setting values. That we now know this is silently failing means that we (and possibly many others) are quietly corrupting our credential databases. ie I'm glad this is being fixed, but it's surprising this issue isn't receiving more priority or attention. |
@aeijdenberg |
New release of credhub-cli is out. You can download it here. Or using the homebrew tap. Closing this out. |
What version of the credhub server you are using?
1.7
What version of the credhub cli you are using?
2.0.0
If you were attempting to accomplish a task, what was it you were attempting to do?
credhub set
What did you expect to happen?
value saved
What was the actual behavior?
credhub cli said it saved my value but it did not.
At the very least.. the
credhub set
should fail.Bonus if the cli detects incompatible client/server combination, or just be backwards compatible.
Please confirm where necessary:
If you are a PCF customer with an Operation Manager (PCF Ops Manager) please direct your questions to support (https://support.pivotal.io/)
The text was updated successfully, but these errors were encountered: