<div dir="ltr">Hi John,<div><br></div><div>Thanks, it was the service account rename. Its working now.</div><div><br></div><div>Cheers.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 11, 2017 at 8:21 PM, John Mazzitelli <span dir="ltr"><<a href="mailto:mazz@redhat.com" target="_blank">mazz@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gareth,<br>
<br>
I've seen this before and when I did it is because the agent doesn't have the cluster-reader role.<br>
<br>
So something happened with the command:<br>
<span class=""><br>
oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:<wbr>openshift-infra:hawkular-agent<br>
<br>
</span>I can tell you just recently I changed names to ensure all names in HOSA are consistent (before, you would see some things named "hawkular-agent" and other times you'd see "hawkular-openshift-agent" and other times you'd see things named "openshift-agent" - I made all names consistent... "hawkular-openshift-agent").<br>
<br>
One of the changes is the name of the service account - it is now "hawkular-openshift-agent" not "hawkular-agent"<br>
<br>
So if you are running newer code, check that. Your command above should be:<br>
<br>
oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:<wbr>openshift-infra:hawkular-<wbr>openshift-agent<br>
<br>
Without that role, the agent will not work at all.<br>
<br>
You can see the Makefile we use to deploy in our dev environments - see the "openshift-deploy" target here:<br>
<br>
<a href="https://github.com/hawkular/hawkular-openshift-agent/blob/master/Makefile#L42-L46" rel="noreferrer" target="_blank">https://github.com/hawkular/<wbr>hawkular-openshift-agent/blob/<wbr>master/Makefile#L42-L46</a><br>
<div class="HOEnZb"><div class="h5"><br>
----- Original Message -----<br>
> Hi John,<br>
><br>
> Just tried deploying latest agent but get an error. Am running the below<br>
> steps to deploy the agent:<br>
><br>
> oc adm policy add-cluster-role-to-user cluster-reader<br>
> system:serviceaccount:<wbr>openshift-infra:hawkular-agent<br>
> oc create -f<br>
> <a href="https://raw.githubusercontent.com/hawkular/hawkular-openshift-agent/master/deploy/openshift/hawkular-openshift-agent-configmap.yaml" rel="noreferrer" target="_blank">https://raw.githubusercontent.<wbr>com/hawkular/hawkular-<wbr>openshift-agent/master/deploy/<wbr>openshift/hawkular-openshift-<wbr>agent-configmap.yaml</a><br>
> -n openshift-infra<br>
> oc process -f<br>
> <a href="https://raw.githubusercontent.com/hawkular/hawkular-openshift-agent/master/deploy/openshift/hawkular-openshift-agent.yaml" rel="noreferrer" target="_blank">https://raw.githubusercontent.<wbr>com/hawkular/hawkular-<wbr>openshift-agent/master/deploy/<wbr>openshift/hawkular-openshift-<wbr>agent.yaml</a><br>
> IMAGE_VERSION=latest | oc create -n openshift-infra -f -<br>
><br>
><br>
> But get this error when the agent starts:<br>
><br>
> E0111 18:34:11.353256 1 node_event_consumer.go:72] Error obtaining<br>
> information about the agent pod<br>
> [openshift-infra/hawkular-<wbr>openshift-agent-h1ynb]. err=User<br>
> "system:serviceaccount:<wbr>openshift-infra:hawkular-<wbr>openshift-agent" cannot get<br>
> pods in project "openshift-infra"<br>
><br>
> I've also got a custom pod that has a configmap mounted, but the agent<br>
> never gets past this error message so doesn't collect any metrics.<br>
><br>
> Output of oc describe on my custom pod shows the volume mount:<br>
><br>
> Volume Mounts:<br>
> /var/run/configmap/hawkular-<wbr>agent from hawkular-openshift-agent (rw)<br>
><br>
> Any ideas?<br>
><br>
> On Sat, Jan 7, 2017 at 1:44 AM, John Mazzitelli <<a href="mailto:mazz@redhat.com">mazz@redhat.com</a>> wrote:<br>
><br>
> > FYI: some new things went into HOSA (that's the Hawkular OpenShift Agent<br>
> > for the uninitiated).<br>
> ><br>
> > 1. The agent now emits its own metrics and can monitor itself. Right now<br>
> > it just emits some basic "go" metrics like memory usage, CPU usage, etc<br>
> > along with one agent-specific one - a counter that counts the number of<br>
> > data points it has collected in its lifetime. We'll add more metrics as we<br>
> > figure out the things people want to see, but we have the infrastructure in<br>
> > place now.<br>
> ><br>
> > 2. The agent is deployed as a daemonset. This means as new nodes are<br>
> > brought online, an agent will go along with it (or so I'm told :)<br>
> ><br>
> > 3. The agent has changed the way it discovers what to monitor - it no<br>
> > longer looks at annotations on pods to determine where the configmaps are<br>
> > for those pods. Instead, it looks up volume declarations to see if there is<br>
> > an agent configmap defined. This was done to be ready for the future when<br>
> > new security constraints will be introduced in OpenShift which would have<br>
> > broken our annotation approach. This approach using volumes should not hit<br>
> > that issue.<br>
> ><br>
> > NOTE: If you are building the latest agent from master, we added some<br>
> > dependencies so you have to update your dependencies via Glide by using the<br>
> > "make update-deps" target prior to building from source.<br>
> > ______________________________<wbr>_________________<br>
> > hawkular-dev mailing list<br>
> > <a href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/hawkular-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/<wbr>mailman/listinfo/hawkular-dev</a><br>
> ><br>
><br>
</div></div></blockquote></div><br></div>