{"action":"closed","issue":{"url":"https://api.github.com/repos/chef/chef-dk/issues/610","labels_url":"https://api.github.com/repos/chef/chef-dk/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-dk/issues/610/comments","events_url":"https://api.github.com/repos/chef/chef-dk/issues/610/events","html_url":"https://github.com/chef/chef-dk/issues/610","id":117440469,"number":610,"title":"knife validatorless bootstrap + chef-vault Options Bootstrap and Rebootstrap ","user":{"login":"sean-horn","id":1459992,"avatar_url":"https://avatars.githubusercontent.com/u/1459992?v=3","gravatar_id":"","url":"https://api.github.com/users/sean-horn","html_url":"https://github.com/sean-horn","followers_url":"https://api.github.com/users/sean-horn/followers","following_url":"https://api.github.com/users/sean-horn/following{/other_user}","gists_url":"https://api.github.com/users/sean-horn/gists{/gist_id}","starred_url":"https://api.github.com/users/sean-horn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sean-horn/subscriptions","organizations_url":"https://api.github.com/users/sean-horn/orgs","repos_url":"https://api.github.com/users/sean-horn/repos","events_url":"https://api.github.com/users/sean-horn/events{/privacy}","received_events_url":"https://api.github.com/users/sean-horn/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef-dk/labels/Delight%20Blockers","name":"Delight Blockers","color":"0052cc"},{"url":"https://api.github.com/repos/chef/chef-dk/labels/Upstream%20Bug","name":"Upstream Bug","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-11-17T20:15:38Z","updated_at":"2016-01-12T19:19:35Z","closed_at":"2016-01-12T19:19:35Z","body":"Zendesk 6982 + 6494\r\n\r\nAs a customer, during the validatorless + chef-vault options bootstrapping of a node, long indexing waits are causing failures of bootstrapping code. I would like this code improved so that it always retries in the face of a long wait, with a configurable retry delay + total tries set to a reasonable default.\r\n\r\nDuring a bootstrap of a new node, the following can happen. If you persist, the client item will eventually be indexed and the bootstrap will work. The issue seems to be located here  https://github.com/Nordstrom/chef-vault/blob/v2.6.1/lib/chef-vault/item.rb#L80\r\n\r\n```\r\n# knife bootstrap x.x.x.x -N chef-test -y -x root --bootstrap-vault-item secrets:test --bootstrap-vault-item secrets:test2 --bootstrap-vault-item secrets:test3\r\nCreating new client for chef-test \r\nCreating new node for chef-test \r\nWARNING: No clients were returned from search, you may not have got what you expected!! \r\nWARNING: No clients were returned from search, you may not have got what you expected!! \r\nWARNING: No clients were returned from search, you may not have got what you expected!!\r\n```\r\n\r\nDuring a validatorless + chef-vault rebootstrap of an existing node, the chef-vault refresh behavior is faulty in that it does not retry the search for the named client as it assumes the client is already authorized against the vault, as shown in https://github.com/Nordstrom/chef-vault/issues/185\r\n\r\nAn example rebootstrap command would be\r\n\r\n```\r\nknife bootstrap 10.0.6.10 -Nappserver <auth options> --sudo -r \"apt, oe_appserver\" -E test --bootstrap-vault-json '{ \"test\": [ \"users\", \"ssl_private_key\" ] }' \r\n```\r\n\r\nThis code works to wait for the indexed client items to show up, but only during a bootstrap where the node/client do not already exist. To workaround the issue shown above during a rebootstrap, the customer must first manually delete the existing node/client. This workaround is clumsy and the behavior could be improved greatly by just embedding the \"node/client delete\" behavior in a rebootstrap situation. https://github.com/chef/chef/blob/12.4-stable/lib/chef/knife/bootstrap/chef_vault_handler.rb#L51"}}