)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"35c3a9181500ccdba7cd2efb238a0b729272717d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch modifies the Dockerfile and configuration script for the Nova"},{"line_number":10,"context_line":"APIcontainer so that the \u0027root\u0027 user executes the container setup"},{"line_number":11,"context_line":"scripts. Thisenables the container httpd configuration script to"},{"line_number":12,"context_line":"execute. The \u0027nova\u0027 user is granted permission to access the log dir."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I374af00a374346840c12777a530d39768b28c908"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1f493fa4_7389e824","line":11,"range":{"start_line":11,"start_character":9,"end_line":11,"end_character":20},"updated":"2020-05-06 08:08:45.000000000","message":"This enables","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"}],"docker/nova/nova-api/extend_start.sh":[{"author":{"_account_id":22165,"name":"caoyuan","email":"cao.yingjunz@gmail.com","username":"caoyuan"},"change_message_id":"ece787e5e78faa4483b5d0b990493ffc2d370b92","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"# TODO(dszumski): When Nova Conductor in Kolla Ansible supports triggering DB"},{"line_number":14,"context_line":"# operations, we should review this script and remove any duplicate"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1f493fa4_a51ecf08","line":11,"range":{"start_line":3,"start_character":0,"end_line":11,"end_character":2},"updated":"2020-05-01 15:16:48.000000000","message":"this has been handles in nova base [1], and nova-api is build from the nova-base image, so there is no need to add it again.\n\n[1]: https://github.com/openstack/kolla/blob/master/docker/nova/nova-base/extend_start.sh","commit_id":"15c0b33f6355c82dcffa2af925e77961da80ee74"}],"docker/nova/nova-base/extend_start.sh":[{"author":{"_account_id":22165,"name":"caoyuan","email":"cao.yingjunz@gmail.com","username":"caoyuan"},"change_message_id":"14e5d459842c7ff061fbdfc24f27db12a12dc33e","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_4a126bb6","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"updated":"2020-05-02 15:14:19.000000000","message":"why this is necessary, if not ,  something bad will happen?","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"d764c36da290a2782c849c1b5215f77b9dffda12","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_81d9d523","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_45a88776","updated":"2020-05-05 09:30:15.000000000","message":"Hmm, well, this is certainly weird because then cinder would require it too. :/","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":30810,"name":"James Kirsch","email":"generalfuzz@gmail.com","username":"generalfuzz"},"change_message_id":"6fafe166a29829fad5d3594ddcd3507636d1b7a3","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_45a88776","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_4a126bb6","updated":"2020-05-04 19:09:57.000000000","message":"Yes. If this is missing, deployment fails with: Permission denied: \u0027/var/log/kolla/nova/nova-manage.log\u0027\n\nHere\u0027s the full failure:\nTraceback (most recent call last):\n  File \\\"/var/lib/kolla/venv/bin/nova-manage\\\", line 8, in \u003cmodule\u003e\n    sys.exit(main())\n  File \\\"/var/lib/kolla/venv/lib/python3.6/site-packages/nova/cmd/manage.py\\\", line 2764, in main\n    logging.setup(CONF, \\\"nova\\\")\n  File \\\"/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_log/log.py\\\", line 273, in setup\n    _setup_logging_from_conf(conf, product_name, version)\n  File \\\"/var/lib/kolla/venv/lib/python3.6/site-packages/oslo_log/log.py\\\", line 381, in _setup_logging_from_conf\n    filelog \u003d file_handler(logpath)\n  File \\\"/usr/lib/python3.6/logging/handlers.py\\\", line 437, in __init__\n    logging.FileHandler.__init__(self, filename, mode, encoding, delay)\n  File \\\"/usr/lib/python3.6/logging/__init__.py\\\", line 1032, in __init__\n    StreamHandler.__init__(self, self._open())\n  File \\\"/usr/lib/python3.6/logging/__init__.py\\\", line 1061, in _open\n    return open(self.baseFilename, self.mode, encoding\u003dself.encoding)\nPermissionError: [Errno 13] Permission denied: \u0027/var/log/kolla/nova/nova-manage.log\u0027","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":30810,"name":"James Kirsch","email":"generalfuzz@gmail.com","username":"generalfuzz"},"change_message_id":"fde567da291193caede12f09fe36dd529ad832a4","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_8e68d0ba","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_5ae686ea","updated":"2020-05-05 22:57:52.000000000","message":"The reason for the permission failure is:\n1.  First the nova role is executed, so nova-api container is created and executes \"nova-manage db sync\", creating the nova-manage.log file with root user (due to change in nova-api dockerfile)\n2. Then nova-cells role is executed, which in turn starts nova-conductor which executes \"nova-manage db sync\" with \"nova\" user, causing the failure. \n\nhaving nova-base execute:\nif [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then\n    chown -R nova:kolla /var/log/kolla/nova\nfi\n\nfixes this after \"nova-manage db sync\" is executed as root.\n\nOpen to alternate suggestions though.","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":30810,"name":"James Kirsch","email":"generalfuzz@gmail.com","username":"generalfuzz"},"change_message_id":"116817d9c87a61f94a77e6962dc5a84bd77e0399","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_e6aa6217","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_6103e910","updated":"2020-05-05 18:42:01.000000000","message":"The failure occurs at:\n\n+++ nova-manage db sync --local_cell\nTraceback (most recent call last):\n  File \\\"/var/lib/kolla/venv/bin/nova-manage\\\", line 8, in \u003cmodule\u003e\n    sys.exit(main())\n\nwhich is executed by kolla by docker/nova/nova-conductor/extend_start.sh\n \nCinder kolla has code similar to this in cinder-volume/extend_start.sh\n\nif [[ $(stat -c %U:%G /etc/iscsi) !\u003d \"cinder:kolla\" ]]; then\n    sudo chown -R cinder:kolla /etc/iscsi\nfi\n\nfull failure  output:\nTASK [nova-cell : Running Nova cell bootstrap container] *********************************************************************************\nfatal: [os1.gresearchoss.io]: FAILED! \u003d\u003e {\"changed\": false, \"msg\": \"Container exited with non-zero return code 1\", \"rc\": 1, \"stderr\": \"+ sudo -E kolla_set_configs\nINFO:__main__:Loading config file at /var/lib/kolla/config_files/config.json\nINFO:__main__:Validating config file\nINFO:__main__:Kolla config strategy set to: COPY_ALWAYS\nINFO:__main__:Copying service configuration files\nINFO:__main__:Copying /var/lib/kolla/config_files/nova.conf to /etc/nova/nova.conf\nINFO:__main__:Setting permission for /etc/nova/nova.conf\nINFO:__main__:Writing out command to execute\nINFO:__main__:Setting permission for /var/log/kolla/nova\n++ cat /run_command\n+ CMD\u003dfalse\n+ ARGS\u003d\n+ sudo kolla_copy_cacerts\n+ [[ ! -n \u0027\u0027 ]]\n+ . kolla_extend_start\n++ [[ ! -d /var/log/kolla/nova ]]\n+++ stat -c %a /var/log/kolla/nova\n++ [[ 2755 !\u003d \\\\7\\\\5\\\\5 ]]\n++ chmod 755 /var/log/kolla/nova\n++ . /usr/local/bin/kolla_nova_extend_start\n+++ [[ -n \u0027\u0027 ]]\n+++ [[ -n 0 ]]\n+++ nova-manage db sync --local_cell\nTraceback (most recent call last):\n  File \\\"/var/lib/kolla/venv/bin/nova-manage\\\", line 8, in \u003cmodule\u003e","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"49217ca5095ebfe89c14b8490685639a8552fec2","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_6103e910","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_81d9d523","updated":"2020-05-05 10:01:27.000000000","message":"There are several places in config.json where it is set to nova:nova.","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"8ec53327d1f2665193665fc5f8bf63b3d3ad85f4","unresolved":false,"context_lines":[{"line_number":3,"context_line":"if [[ ! -d \"/var/log/kolla/nova\" ]]; then"},{"line_number":4,"context_line":"    mkdir -p /var/log/kolla/nova"},{"line_number":5,"context_line":"fi"},{"line_number":6,"context_line":"if [[ $(stat -c %U:%G /var/log/kolla/nova) !\u003d \"nova:kolla\" ]]; then"},{"line_number":7,"context_line":"    chown -R nova:kolla /var/log/kolla/nova"},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":"if [[ $(stat -c %a /var/log/kolla/nova) !\u003d \"755\" ]]; then"},{"line_number":10,"context_line":"    chmod 755 /var/log/kolla/nova"},{"line_number":11,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":3,"id":"1f493fa4_5ae686ea","line":8,"range":{"start_line":6,"start_character":0,"end_line":8,"end_character":2},"in_reply_to":"1f493fa4_e6aa6217","updated":"2020-05-05 19:11:14.000000000","message":"Yeah, but it\u0027s for iscsi. AFAIS, both Nova and Cinder have the same logic as far as logs are concerned so it needs some tracing when the dirs/files get created and under what users. Could it be that Nova drops its privileges before it runs the bootstrap and Cinder does not (still weird but would explain this)? We don\u0027t want to block this change but introducing more weirdness into Kolla does not help in maintaining.","commit_id":"8f45e6659e123a7add6b88f71522ec595757a0ef"}]}
