Skip to content
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

Users that fail to be created cause downstream issues with key imports #148

Open
jasonwbarnett opened this issue Oct 1, 2020 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@jasonwbarnett
Copy link
Contributor

Version:

v2.4.6

Environment:

  • Redhat 7
  • Chef Server Core v13.2.0

Scenario:

Restore from backup, e.g. knife ec restore --with-key-sql --with-user-sql

Steps to Reproduce:

Put an invalid email address in any of the users you're restoring.

Expected Result:

I would expect the process to safely handle when a user failed to be created and not error out on the key import process.

Actual Result:

An error is thrown and exits the process immediately

@jasonwbarnett jasonwbarnett added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Oct 1, 2020
@jasonwbarnett
Copy link
Contributor Author

The issue is here

db[:users].where(:username => d['name']).first[:id]

The user is not found and then #[](:id) is called on nil and throws an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant