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