goiardi icon indicating copy to clipboard operation
goiardi copied to clipboard

Message "cannot parse UTC" in goiardi logs

Open d-averkiev opened this issue 5 years ago • 4 comments
trafficstars

We are running goiardi in the containers in AWS ECS. Server works well and no failures during the chef runs. But I am seeing this message in the server logs:

2020/06/03 12:27:50 [INFO] [main] parsing time "2020-06-03 12:27:50 UTC" as "2006-01-02 15:04:05 -0700": cannot parse "UTC" as "-0700"

Should I worry or do anything because of this message?

d-averkiev avatar Jun 03 '20 13:06 d-averkiev

It's probably not a huge deal, but I'm curious where that's coming from. Do you have any idea what might be causing it?

ctdk avatar Jun 04 '20 00:06 ctdk

I see the same log entry. It may be caused by

n.n.n.n - - [18/Jun/2020:12:19:01 +0000] "POST /data-collector HTTP/1.1" 200 0 "-" "Chef Client/16.1.16 (r
uby-2.7.1-p83; ohai-16.1.1; x86_64-linux; +https://gitlab.com/cinc-project/organization-subjects/wikis/home)" "-"

It happens when chef 16 (or cinc) starts and POSTs to this endpoint

rmoriz avatar Jun 18 '20 12:06 rmoriz

As far as I can see, goiardi does not implement the POST /data-collector endpoint but maps all /data to the data handler, which then produces the message.

I was able to work around the issue by disabling data collection on the chef-client in client.rb:

client.rb

data_collector.output_locations nil
data_collector.server_url nil

When using chef-client cookbook to render the client.rb one could use the following attributes to get the config settings mentioned above:

  default['chef_client']['config']['data_collector.server_url'] = nil
  default['chef_client']['config']['data_collector.output_locations']  = nil

rmoriz avatar Jun 18 '20 13:06 rmoriz

Aha, thank you for digging that up @rmoriz. I'll see what I can do about that endpoint.

ctdk avatar Jun 18 '20 17:06 ctdk