PM - Is it possible to change the Data Aggregator consul process owner?

book

Article ID: 207948

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

We are seeing that consul process in Data Aggregator is running as "consul" user but as not "root":

[email protected] ~# ps -ef  | grep -i consul
consul    69156      1  0 Jan22 ?        02:45:13 /opt/IMDataAggregator/consul/bin/consul agent -bind=XX.XX.XX.XXX -disable-host-node-id -config-dir=/opt/IMDataAggregator/consul/conf
root     119133      1  0 10:30 ?        00:00:34 /opt/IMDataAggregator/jre/bin/java -cp /opt/IMDataAggregator/consul-ext/bin/consul-ext.jar:/opt/IMDataAggregator/consul-ext/bin/bc-fips.jar com.ca.consul.ext.Main -a localhost -p 8500 -c /opt/IMDataAggregator/consul-ext/conf/config.json -w /opt/IMDataAggregator/consul-ext -S false
root     140845 140680  0 13:24 pts/1    00:00:00 grep --color=auto -i consul

 

Is it possible to change the user to root?

Environment

Any NetOPs Performance Management release

Resolution

Yes, it is possible to change it. In order to do so, you would need to edit the service file (consul.service) and update the "User" property to root:

[email protected] ~# vi /etc/systemd/system/consul.service
[Unit]
Description=Consul Agent
Requires=network-online.target
After=network-online.target

[Service]
ExecStart=/opt/IMDataAggregator/consul/bin/consul agent -bind=xxxxxx -disable-host-node-id -config-dir=/opt/IMDataAggregator/consul/conf
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-abort
KillSignal=SIGTERM
User=consul

[Install]
WantedBy=multi-user.target


Then chown the files owned by consul to be owned by root.

Note: upgrades will set it back to consul