Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How to Change the Debug Level for PF9-consul Logs?
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
Change the log levels for the PF9-consul logs.
Default Logs level configured for _"/var/log/pf9/pf9-consul.log"_ can be verified in the _"pf9-ha.conf"_ and _"server.json"_ on the hosts.
pf9-consul.log
x
# cat /opt/pf9/etc/pf9-ha/conf.d/pf9-ha.conf | grep -i "consul_log_level"consul_log_level = debug # cat /opt/pf9/etc/pf9-consul/conf.d/server.json{"bootstrap_expect": 3, "server": true, "datacenter": "3", "data_dir": "/opt/pf9/consul-data-dir/", "advertise_addr": "172.20.113.39", "bind_addr": "172.20.113.39", "disable_remote_exec": true, "log_level": "debug", "node_name": "011ed680-aa4d-451d-8756-e257a9678e12", "retry_join": ["172.20.113.32", "172.20.113.33", "172.20.113.34", "172.20.113.35", "172.20.113.36", "172.20.113.37", "172.20.113.38", "172.20.113.39", "172.20.113.40", "172.20.113.41"], "encrypt": "QjJYWTVxc3ZRU2E0eWMtMw==", "verify_incoming": true, "verify_outgoing": true, "verify_server_hostname": false, "ca_file": "/opt/pf9/etc/pf9-consul/consul_ca.pem", "cert_file": "/opt/pf9/etc/pf9-consul/consul_cert.pem", "key_file": "/opt/pf9/etc/pf9-consul/consul_key.pem"}[root@aidc-ostack-prd8 ~]#Environment
- Platform9 Managed OpenStack - v5.4.0 and Higher
Procedure
We need to update in the Resmgr DB for Roles and Hosts table.
- Roles table need to be updated so that the same configurations should get reflected to the new hosts.
Roles table in Resmgr DB
mysql> update roles set customizable_settings = REPLACE (customizable_settings, "debug", "info") where id="pf9-ha-slave_5.6.6-969";2. Hosts table need to be updated - It should start reflecting the config to the already on-boarded hosts.
Bash
xxxxxxxxxxmysql> update hosts set role_settings = REPLACE (role_settings, "debug", "info");- Verify the "____**consul__log___level"**_ configurations using below commands or
_"/var/log/pf9/pf9-consul.log"_the on the node:
Bash
# cat /opt/pf9/etc/pf9-ha/conf.d/pf9-ha.conf | grep -i "consul_log_level"consul_log_level = info # cat /opt/pf9/etc/pf9-consul/conf.d/server.json{"bootstrap_expect": 3, "server": true, "datacenter": "3", "data_dir": "/opt/pf9/consul-data-dir/", "advertise_addr": "172.20.113.39", "bind_addr": "172.20.113.39", "disable_remote_exec": true, "log_level": "info", "node_name": "011ed680-aa4d-451d-8756-e257a9678e12", "retry_join": ["172.20.113.32", "172.20.113.33", "172.20.113.34", "172.20.113.35", "172.20.113.36", "172.20.113.37", "172.20.113.38", "172.20.113.39", "172.20.113.40", "172.20.113.41"], "encrypt": "QjJYWTVxc3ZRU2E0eWMtMw==", "verify_incoming": true, "verify_outgoing": true, "verify_server_hostname": false, "ca_file": "/opt/pf9/etc/pf9-consul/consul_ca.pem", "cert_file": "/opt/pf9/etc/pf9-consul/consul_cert.pem", "key_file": "/opt/pf9/etc/pf9-consul/consul_key.pem"}Or
We use curl API request to update the role settings for a host:
Bash
curl -k -X 'PUT' -H "X-Auth-Token: $TOKEN" -H 'Content-Type: application/json;charset=UTF-8' "https://test-du-vmha-centos7-2835695-r2.platform9.horse/resmgr/v1/hosts/<host-id>/roles/pf9-ha-slave" -d '{"consul_log_level": "debug"}'VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message