Status slow on webui

Hi,

I wonder if someone can point us in the right direction, please. We
are running chef server with webui with 25 nodes. We can browse the
nodes, roles, clients and users with reasonable response times.
Cookbooks take a little longer but status takes 190-200 seconds.
Here’s some extracts from the log:

merb : chef-server-webui : worker (port 4040) ~ Params:
{“format”=>nil, “action”=>“index”, “controller”=>“nodes”}
merb : chef-server-webui : worker (port 4040) ~
{:before_filters_time=>0.038996, :action_time=>0.256378,
:dispatch_time=>0.256793, :after_filters_time=>1.5e-05}

merb : chef-server-webui : worker (port 4040) ~ Params:
{“action”=>“index”, “controller”=>“status”}
merb : chef-server-webui : worker (port 4040) ~
{:before_filters_time=>0.038847, :action_time=>90.80266,
:dispatch_time=>90.80309, :after_filters_time=>1.4e-05}

Where do we start looking? We could see the node status quite
efficiently a few days ago, but today we get this.

Thanks
Otto

Hi all -

I’m using the github opscode Windows cookbook (1.2.9) to add registry
entries…when I use the example syntax, it works great (i’ve added the
logging):

windows_registry
’HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent’ do
values ‘sysContact’ => node[:snmpd][:sysContact], ‘sysLocation’ =>
node.chef_environment
Chef::Log.info("** #{values}**")
end

I have a use case for adding a dynamic number of key/value pairs into
the hash…so I’m forced to use a different hash operator. However, if
I switch to the other hash syntax (shown below):

windows_registry
’HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent’ do
values[‘sysContact’] = node[:snmpd][:sysContact]
values[‘sysLocation’] = node.chef_environment
Chef::Log.info("** #{values}**")
end

the chef-client fails with the following error: “FATAL: NoMethodError:
undefined method ‘[]=’ for nil:NilClass”…despite the “values” hash
being printed to in the logs identically to the “good” hash syntax.

The error above can be traced back to the registry.rb provider, where
the values hash is apparently nil ({}).

I’ve tried everything I can think of (explicitly instantiating the
"values" hash as new, declaring “values” as both instance and/or global
scope), and I’m not getting anywhere.

Does anybody have any other suggestions?

Thanks for your time.
Bryan

Show full stack trace and code on a gist, with DEBUG log level.

Regards,

--AJ

On 7 February 2012 06:16, Bryan Stenson bryan.stenson@gmail.com wrote:

Hi all -

I'm using the github opscode Windows cookbook (1.2.9) to add registry
entries...when I use the example syntax, it works great (i've added the
logging):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values 'sysContact' => node[:snmpd][:sysContact], 'sysLocation' =>
node.chef_environment
Chef::Log.info("** #{values}**")
end

I have a use case for adding a dynamic number of key/value pairs into the
hash...so I'm forced to use a different hash operator. However, if I switch
to the other hash syntax (shown below):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values['sysContact'] = node[:snmpd][:sysContact]
values['sysLocation'] = node.chef_environment
Chef::Log.info("** #{values}**")
end

the chef-client fails with the following error: "FATAL: NoMethodError:
undefined method '=' for nil:NilClass"...despite the "values" hash being
printed to in the logs identically to the "good" hash syntax.

The error above can be traced back to the registry.rb provider, where the
values hash is apparently nil ({}).

I've tried everything I can think of (explicitly instantiating the "values"
hash as new, declaring "values" as both instance and/or global scope), and
I'm not getting anywhere.

Does anybody have any other suggestions?

Thanks for your time.
Bryan

Thanks AJ -

Source code is here: https://gist.github.com/1754671

DEBUG logs are here: https://gist.github.com/1754690

As you can see, I have a "windows-application-role" which has the snmpd
and windows default recipes applied....this role is applied to my server
in question.

Bryan

On 02/06/2012 11:59 AM, AJ Christensen wrote:

Show full stack trace and code on a gist, with DEBUG log level.

Regards,

--AJ

On 7 February 2012 06:16, Bryan Stensonbryan.stenson@gmail.com wrote:

Hi all -

I'm using the github opscode Windows cookbook (1.2.9) to add registry
entries...when I use the example syntax, it works great (i've added the
logging):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values 'sysContact' => node[:snmpd][:sysContact], 'sysLocation' =>
node.chef_environment
Chef::Log.info("** #{values}**")
end

I have a use case for adding a dynamic number of key/value pairs into the
hash...so I'm forced to use a different hash operator. However, if I switch
to the other hash syntax (shown below):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values['sysContact'] = node[:snmpd][:sysContact]
values['sysLocation'] = node.chef_environment
Chef::Log.info("** #{values}**")
end

the chef-client fails with the following error: "FATAL: NoMethodError:
undefined method '=' for nil:NilClass"...despite the "values" hash being
printed to in the logs identically to the "good" hash syntax.

The error above can be traced back to the registry.rb provider, where the
values hash is apparently nil ({}).

I've tried everything I can think of (explicitly instantiating the "values"
hash as new, declaring "values" as both instance and/or global scope), and
I'm not getting anywhere.

Does anybody have any other suggestions?

Thanks for your time.
Bryan

Try something like this:

In a resource, the parameters are assigned using a method_missing on
the Resource class (or something similar), this means, among other
things, that you might not have access to manipulate a hash Parameter
with =

Regards,

--AJ

On 7 February 2012 09:41, Bryan Stenson bryan.stenson@gmail.com wrote:

Thanks AJ -

Source code is here: https://gist.github.com/1754671

DEBUG logs are here: https://gist.github.com/1754690

As you can see, I have a "windows-application-role" which has the snmpd and
windows default recipes applied....this role is applied to my server in
question.

Bryan

On 02/06/2012 11:59 AM, AJ Christensen wrote:

Show full stack trace and code on a gist, with DEBUG log level.

Regards,

--AJ

On 7 February 2012 06:16, Bryan Stensonbryan.stenson@gmail.com wrote:

Hi all -

I'm using the github opscode Windows cookbook (1.2.9) to add registry
entries...when I use the example syntax, it works great (i've added the
logging):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values 'sysContact' => node[:snmpd][:sysContact], 'sysLocation' =>
node.chef_environment
Chef::Log.info("** #{values}**")
end

I have a use case for adding a dynamic number of key/value pairs into the
hash...so I'm forced to use a different hash operator. However, if I
switch
to the other hash syntax (shown below):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values['sysContact'] = node[:snmpd][:sysContact]
values['sysLocation'] = node.chef_environment
Chef::Log.info("** #{values}**")
end

the chef-client fails with the following error: "FATAL: NoMethodError:
undefined method '=' for nil:NilClass"...despite the "values" hash
being
printed to in the logs identically to the "good" hash syntax.

The error above can be traced back to the registry.rb provider, where the
values hash is apparently nil ({}).

I've tried everything I can think of (explicitly instantiating the
"values"
hash as new, declaring "values" as both instance and/or global scope),
and
I'm not getting anywhere.

Does anybody have any other suggestions?

Thanks for your time.
Bryan

that's it! thank you SO much. (my forehead can start healing now)

On 02/06/2012 12:46 PM, AJ Christensen wrote:

Try something like this:
My snmpd cookbook for windows · GitHub

In a resource, the parameters are assigned using a method_missing on
the Resource class (or something similar), this means, among other
things, that you might not have access to manipulate a hash Parameter
with =

Regards,

--AJ

On 7 February 2012 09:41, Bryan Stensonbryan.stenson@gmail.com wrote:

Thanks AJ -

Source code is here: https://gist.github.com/1754671

DEBUG logs are here: https://gist.github.com/1754690

As you can see, I have a "windows-application-role" which has the snmpd and
windows default recipes applied....this role is applied to my server in
question.

Bryan

On 02/06/2012 11:59 AM, AJ Christensen wrote:

Show full stack trace and code on a gist, with DEBUG log level.

Regards,

--AJ

On 7 February 2012 06:16, Bryan Stensonbryan.stenson@gmail.com wrote:

Hi all -

I'm using the github opscode Windows cookbook (1.2.9) to add registry
entries...when I use the example syntax, it works great (i've added the
logging):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values 'sysContact' => node[:snmpd][:sysContact], 'sysLocation' =>
node.chef_environment
Chef::Log.info("** #{values}**")
end

I have a use case for adding a dynamic number of key/value pairs into the
hash...so I'm forced to use a different hash operator. However, if I
switch
to the other hash syntax (shown below):

windows_registry
'HKLM\SYSTEM\CurrentControlSet\services\SNMP\Parameters\RFC1156Agent' do
values['sysContact'] = node[:snmpd][:sysContact]
values['sysLocation'] = node.chef_environment
Chef::Log.info("** #{values}**")
end

the chef-client fails with the following error: "FATAL: NoMethodError:
undefined method '=' for nil:NilClass"...despite the "values" hash
being
printed to in the logs identically to the "good" hash syntax.

The error above can be traced back to the registry.rb provider, where the
values hash is apparently nil ({}).

I've tried everything I can think of (explicitly instantiating the
"values"
hash as new, declaring "values" as both instance and/or global scope),
and
I'm not getting anywhere.

Does anybody have any other suggestions?

Thanks for your time.
Bryan