Node Role isn't updated


#1

Hi,
I am deploying a windows node with Chef (for the first time I use windows OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter) in its run list.

The major problem is when I am trying to search the nodes under this role name I get empty list:

$ knife search node "roles:converter"
0 items found

Another issue I have noticed:
When I run the chef-client on the windows node, I have 404 warning, below is the full output of chef-client run:

chef-client

[2013-06-30T15:17:09+01:00] INFO: *** Chef 11.4.4 ***
[2013-06-30T15:17:13+01:00] WARN: unable to detect ip6address
[2013-06-30T15:17:25+01:00] INFO: Run List is [role[converter]]
[2013-06-30T15:17:25+01:00] INFO: Run List expands to [windows]
[2013-06-30T15:17:25+01:00] INFO: HTTP Request Returned 404 Not Found: No routes match the request: /reports/nodes/win-conv1/runs
[2013-06-30T15:17:25+01:00] INFO: Starting Chef Run for win-conv1
[2013-06-30T15:17:25+01:00] INFO: Running start handlers
[2013-06-30T15:17:25+01:00] INFO: Start handlers complete.
[2013-06-30T15:17:27+01:00] INFO: Loading cookbooks [chef_handler, windows]
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action install (windows::default line 31)
[2013-06-30T15:17:31+01:00] INFO: Chef Run complete in 5.4756 seconds
[2013-06-30T15:17:31+01:00] INFO: Running report handlers
[2013-06-30T15:17:31+01:00] INFO: Report handlers complete

Please advise.

Thanks !


#2

Can you check if the issue is specific to search?
Try;
knife node show -a roles
And check if you can see the role. If you can then its a sold specific
issue , otherwise its something to do with chef.
How the role is being applied? Directly using run list or via some other
means?
On Jun 30, 2013 7:20 AM, “Michael L.” bigmyx@gmail.com wrote:

Hi,
I am deploying a windows node with Chef (for the first time I use windows
OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter)
    in its run list.

The major problem is when I am trying to search the nodes under this role
name I get empty list:

$ knife search node "roles:converter"
0 items found

Another issue I have noticed:
When I run the chef-client on the windows node, I have 404 warning, below
is the full output of chef-client run:

chef-client

[2013-06-30T15:17:09+01:00] INFO: *** Chef 11.4.4 ***
[2013-06-30T15:17:13+01:00] WARN: unable to detect ip6address
[2013-06-30T15:17:25+01:00] INFO: Run List is [role[converter]]
[2013-06-30T15:17:25+01:00] INFO: Run List expands to [windows]
[2013-06-30T15:17:25+01:00] INFO: HTTP Request Returned 404 Not Found: No
routes match the request: /reports/nodes/win-conv1/runs
[2013-06-30T15:17:25+01:00] INFO: Starting Chef Run for win-conv1
[2013-06-30T15:17:25+01:00] INFO: Running start handlers
[2013-06-30T15:17:25+01:00] INFO: Start handlers complete.
[2013-06-30T15:17:27+01:00] INFO: Loading cookbooks [chef_handler, windows]
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action
install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service]
action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action
install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service]
action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action
install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action
install (windows::default line 31)
[2013-06-30T15:17:31+01:00] INFO: Chef Run complete in 5.4756 seconds
[2013-06-30T15:17:31+01:00] INFO: Running report handlers
[2013-06-30T15:17:31+01:00] INFO: Report handlers complete

Please advise.

Thanks !


#3

Hi,

On Monday, July 1, 2013, Michael L. wrote:

Hi,
I am deploying a windows node with Chef (for the first time I use windows
OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter)
    in its run list.

The major problem is when I am trying to search the nodes under this role
name I get empty list:

$ knife search node "roles:converter"
0 items found

My guess is that the windows node is producing too much ohai data and is
thus silently failing to be indexed and if that is the case then no search
will return the node. To fix this you can disable ohai plugins from the
node, remove ohai data explicitly at the end of chef run or update the
indexer to handle the larger size.

For the last one search in the sole config file (sole-config.xml iirc) and
look for value for maxKeysize or similar - it will be 10000 - add an extra
0 in. Sorry for being less specific but I am away from my laptop.


Cheers,

Peter Donald


#4

even if the search fails, knife node show <nodename> -a roles should
reflect the roles, as long as chef-client on the node ran successfully and
posted the data back to chef server

On Sun, Jun 30, 2013 at 1:26 PM, Peter Donald peter@realityforge.orgwrote:

Hi,

On Monday, July 1, 2013, Michael L. wrote:

Hi,
I am deploying a windows node with Chef (for the first time I use windows
OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter)
    in its run list.

The major problem is when I am trying to search the nodes under this role
name I get empty list:

$ knife search node "roles:converter"
0 items found

My guess is that the windows node is producing too much ohai data and is
thus silently failing to be indexed and if that is the case then no search
will return the node. To fix this you can disable ohai plugins from the
node, remove ohai data explicitly at the end of chef run or update the
indexer to handle the larger size.

For the last one search in the sole config file (sole-config.xml iirc) and
look for value for maxKeysize or similar - it will be 10000 - add an extra
0 in. Sorry for being less specific but I am away from my laptop.


Cheers,

Peter Donald


#5

This. When dealing with windows nodes just be preemptive and bump the solr
settings or you’re gonna have a bad time.
On Jun 30, 2013 4:26 PM, “Peter Donald” peter@realityforge.org wrote:

Hi,

On Monday, July 1, 2013, Michael L. wrote:

Hi,
I am deploying a windows node with Chef (for the first time I use windows
OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter)
    in its run list.

The major problem is when I am trying to search the nodes under this role
name I get empty list:

$ knife search node "roles:converter"
0 items found

My guess is that the windows node is producing too much ohai data and is
thus silently failing to be indexed and if that is the case then no search
will return the node. To fix this you can disable ohai plugins from the
node, remove ohai data explicitly at the end of chef run or update the
indexer to handle the larger size.

For the last one search in the sole config file (sole-config.xml iirc) and
look for value for maxKeysize or similar - it will be 10000 - add an extra
0 in. Sorry for being less specific but I am away from my laptop.


Cheers,

Peter Donald


#6

I’d like to know if this worked. I thought one of the Chef 11 updates
was that they were automatically doing that now. But I agree this
sounds like the classic node data and solr limits.

John E. Vincent (lusis) wrote:

This. When dealing with windows nodes just be preemptive and bump the
solr settings or you’re gonna have a bad time.

On Jun 30, 2013 4:26 PM, “Peter Donald” <peter@realityforge.org
mailto:peter@realityforge.org> wrote:

Hi,

On Monday, July 1, 2013, Michael L. wrote:

    Hi,
    I am deploying a windows node with Chef (for the first time I
    use windows OS with Chef).
    All goes well beside one thing:

    1. The windows machine has chef client and successfully runs it.
    2. I see the windows node amongst other nodes in chef server.
    3. I see that the windows machine has the proper "role" name
    (converter) in its run list.

    The major problem is when I am trying to search the nodes
    under this role name I get empty list:

    $ knife search node "roles:converter"
    0 items found

My guess is that the windows node is producing too much ohai data
and is thus silently failing to be indexed and if that is the case
then no search will return the node. To fix this you can disable
ohai plugins from the node, remove ohai data explicitly at the end
of chef run or update the indexer to handle the larger size.

For the last one search in the sole config file (sole-config.xml
iirc) and look for value for maxKeysize or similar - it will be
10000 - add an extra 0 in. Sorry for being less specific but I am
away from my laptop.


-- 
Cheers,

Peter Donald

#7

$ knife node show win-conv1 -a roles
roles: converter

Moreover, I can see the other nodes by " knife search node ‘roles:another_role’ "
I aslo have browsed the couchDB and verified the “by_role” nodes filter shows the windows box correctly.

The role was applied using “run_list add” knife sub-comand.
BTW, another issue (probably related) - I cannot edit node:

$ knife node edit win-conv1
Node not updated, skipping node save
(empty editor window popped up)

Any thoughts ?

On Jun 30, 2013, at 7:53 PM, Ranjib Dey dey.ranjib@gmail.com wrote:

Can you check if the issue is specific to search?
Try;
knife node show -a roles
And check if you can see the role. If you can then its a sold specific issue , otherwise its something to do with chef.
How the role is being applied? Directly using run list or via some other means?

On Jun 30, 2013 7:20 AM, “Michael L.” bigmyx@gmail.com wrote:
Hi,
I am deploying a windows node with Chef (for the first time I use windows OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter) in its run list.

The major problem is when I am trying to search the nodes under this role name I get empty list:

$ knife search node "roles:converter"
0 items found

Another issue I have noticed:
When I run the chef-client on the windows node, I have 404 warning, below is the full output of chef-client run:

chef-client

[2013-06-30T15:17:09+01:00] INFO: *** Chef 11.4.4 ***
[2013-06-30T15:17:13+01:00] WARN: unable to detect ip6address
[2013-06-30T15:17:25+01:00] INFO: Run List is [role[converter]]
[2013-06-30T15:17:25+01:00] INFO: Run List expands to [windows]
[2013-06-30T15:17:25+01:00] INFO: HTTP Request Returned 404 Not Found: No routes match the request: /reports/nodes/win-conv1/runs
[2013-06-30T15:17:25+01:00] INFO: Starting Chef Run for win-conv1
[2013-06-30T15:17:25+01:00] INFO: Running start handlers
[2013-06-30T15:17:25+01:00] INFO: Start handlers complete.
[2013-06-30T15:17:27+01:00] INFO: Loading cookbooks [chef_handler, windows]
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-api] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-service] action install (windows::default line 23)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-api] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[windows-pr] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-dir] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-event] action install (windows::default line 31)
[2013-06-30T15:17:27+01:00] INFO: Processing chef_gem[win32-mutex] action install (windows::default line 31)
[2013-06-30T15:17:31+01:00] INFO: Chef Run complete in 5.4756 seconds
[2013-06-30T15:17:31+01:00] INFO: Running report handlers
[2013-06-30T15:17:31+01:00] INFO: Report handlers complete

Please advise.

Thanks !


#8

updated the following:

100000
100000

restarted all chef services (including chef-solr) + re-registered the node
sadly, the result is still the same …

On Jun 30, 2013, at 11:26 PM, Peter Donald peter@realityforge.org wrote:

Hi,

On Monday, July 1, 2013, Michael L. wrote:
Hi,
I am deploying a windows node with Chef (for the first time I use windows OS with Chef).
All goes well beside one thing:

  1. The windows machine has chef client and successfully runs it.
  2. I see the windows node amongst other nodes in chef server.
  3. I see that the windows machine has the proper “role” name (converter) in its run list.

The major problem is when I am trying to search the nodes under this role name I get empty list:

$ knife search node "roles:converter"
0 items found

My guess is that the windows node is producing too much ohai data and is thus silently failing to be indexed and if that is the case then no search will return the node. To fix this you can disable ohai plugins from the node, remove ohai data explicitly at the end of chef run or update the indexer to handle the larger size.

For the last one search in the sole config file (sole-config.xml iirc) and look for value for maxKeysize or similar - it will be 10000 - add an extra 0 in. Sorry for being less specific but I am away from my laptop.


Cheers,

Peter Donald


#9

On Monday, July 1, 2013 at 1:46 AM, Michael L. wrote:

updated the following:

100000
100000

restarted all chef services (including chef-solr) + re-registered the node
sadly, the result is still the same …

What version of Chef server is this? Have you re-run Chef on the affected node or rebuilt the search index?


Daniel DeLeo


#10

It’s chef server 10
I have removed the node from server and re-run the chef-client on the node

On Jul 1, 2013, at 18:26, Daniel DeLeo dan@kallistec.com wrote:

On Monday, July 1, 2013 at 1:46 AM, Michael L. wrote:

updated the following:

100000
100000

restarted all chef services (including chef-solr) + re-registered the node
sadly, the result is still the same …

What version of Chef server is this? Have you re-run Chef on the affected node or rebuilt the search index?


Daniel DeLeo


#11

On Monday, July 1, 2013 at 8:32 AM, Michael L. wrote:

It’s chef server 10
I have removed the node from server and re-run the chef-client on the node

Apparently the maxFieldLength option appears in two places in the config and you have to change both of them :frowning:

See here: http://tickets.opscode.com/browse/CHEF-2346?focusedCommentId=22136&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-22136


Daniel DeLeo


#12

Finally - it works !
Changing the both values did the trick.
Thanks a lot!

On Jul 1, 2013, at 6:36 PM, Daniel DeLeo dan@kallistec.com wrote:

On Monday, July 1, 2013 at 8:32 AM, Michael L. wrote:

It’s chef server 10
I have removed the node from server and re-run the chef-client on the node
Apparently the maxFieldLength option appears in two places in the config and you have to change both of them :frowning:

See here: http://tickets.opscode.com/browse/CHEF-2346?focusedCommentId=22136&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-22136


Daniel DeLeo