Constraint of number of clients in chef-vault

Is there any number constraint for the number of clients which can be on a particular chef-vault.

On creating a vault for 1100 nodes, its giving the error as -;

ERROR: Request-URI Too Large

414 Request-URI Too Large

414 Request-URI Too Large


hi @priyanshu,
there’s no limit on the number of clients in a vault, but by default the Chef Server has a limit on the maximum size of JSON documents you can upload to it. To get around this problem (and make chef-vault much faster), we recently added sparse mode to chef-vault. To use it, pass -K sparse to knife vault create.

You’ll need an up to date ChefDK installed for this to work properly.

Hi @thommay I am using only a single json file to create a vault, which is having just 9 values.
How should I pass that file now… can you please share the syntax.
Currently i am using as follows
knife vault create vault_name vault_id -A user -M client -C ‘name:x,y,…z’ -J /tmp/attributes. json

When I am passing many clients at one go then i am getting error as the private key not exists on node, although there is client.pem existing on node.
But instead of -C when using -S with a single value, it works fine.

I have 1100 nodes, it will be tedious for me to update the vault one by one with the client names.
What might be the issue, can you suggest. why at one go the vault is unable to detect the key with -C option, and with -S also it works for one value

what is the default value of data bags that can exist on chef server.
as mentioned by you @thommay “but by default the Chef Server has a limit on the maximum size of JSON documents you can upload to it”

just add -K sparse to that command.

When you use -C, it takes the name or list of names of clients, but you're specifying a search. either do: -C x,y,z or specify a search using -S.

ya but when using -C x,yz , it is not recognizing the private key of the nodes

when using -S x it is working.
then again updating -S y then it is working.