)]}'
{"paunch/utils/systemd.py":[{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"79050314af25fd66dd50b6275e5a4199e18e2ccf","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    # in a specific order. The host can be configured to prevent"},{"line_number":70,"context_line":"    # systemd from stopping the associated systemd scopes too early,"},{"line_number":71,"context_line":"    # so make sure to generate the start command accordingly."},{"line_number":72,"context_line":"    if (len(cconfig.get(\u0027depends_on\u0027, [])) \u003e 0 and"},{"line_number":73,"context_line":"            os.path.exists(DROP_IN_MARKER_FILE)):"},{"line_number":74,"context_line":"        start_cmd \u003d \u0027/usr/libexec/paunch-start-podman-container %s\u0027 % container"},{"line_number":75,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_17c15b81","line":72,"range":{"start_line":72,"start_character":7,"end_line":72,"end_character":46},"updated":"2019-07-22 16:35:55.000000000","message":"Damien, I think we could remove that dependency, for two reasons:\n\n* In THT, most of the services who rely on RabbitMQ and Galera don\u0027t have this depends_on configured; so the dropin will not be created for them, while we need it.\n* All paunch-managed containers rely on paunch-container-shutdown.service (see L#97: After\u003dpaunch-container-shutdown.service); which itself has After\u003dpacemaker.service (+ other things). So I think the ordering is done at that level; and we might not need to patch all services in THT to have depends_on galera/rabbitmq, since Pacemaker is already a dependency in paunch-container-shutdown.service.\n\nWhat do you think?","commit_id":"b33aeea9728233aca852a3e132f23fca71ac42df"},{"author":{"_account_id":20778,"name":"Damien Ciabrini","email":"dciabrin@redhat.com","username":"dciabrin"},"change_message_id":"2a299253bc923bc6f82a137a30527ea64f36055a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    # in a specific order. The host can be configured to prevent"},{"line_number":70,"context_line":"    # systemd from stopping the associated systemd scopes too early,"},{"line_number":71,"context_line":"    # so make sure to generate the start command accordingly."},{"line_number":72,"context_line":"    if (len(cconfig.get(\u0027depends_on\u0027, [])) \u003e 0 and"},{"line_number":73,"context_line":"            os.path.exists(DROP_IN_MARKER_FILE)):"},{"line_number":74,"context_line":"        start_cmd \u003d \u0027/usr/libexec/paunch-start-podman-container %s\u0027 % container"},{"line_number":75,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_b74e1294","line":72,"range":{"start_line":72,"start_character":7,"end_line":72,"end_character":46},"in_reply_to":"7faddb67_17c15b81","updated":"2019-07-25 10:58:57.000000000","message":"Right, fair questions, let me try to elaborate  on my answer:\n\nA - Why i think it should work\n\nI added that line to limit the number of services that would need to fiddle with systemd transient scopes to the ones which have a currently known shutdown orderning constraint (e.g. nova-compute -\u003e nova-libvirt). That is, only to the services which currently have a depends-on expressed in -t-h-t. I did that to limit the impact (performance and behaviour) to the needed services. Now let me explain why I think this should work.\n\nThere are two different use cases to consider:\n- When we deploy with pacemaker-managed containers (i.e. HA overcloud).\nIn that case, pacemaker tweaks the transient scope files to prevent systemd from shutting down pacemaker-managed containers. So on shutdown, we are sure that openstack services will be shutdown _before_ pacemaker containers (thanks to \"After\u003dpaunch-container-shutdown\").\n\n- When we deploy without pacemaker (i.e. undercloud, standalone)\nIn that case, mariadb/rabbitmq/whatnot are not configured to tweak the transient systemd scope, so on shutdown systemd could stop them at any time, especially before the openstack services. However I don\u0027t think this is a problem as currently there is no service defined in t-h-t which explicitely depends on mysql or rabbit. Besides, all openstack service are normally configured to survive disconnection to mariadb/rabbitmq/whatnot.\n\n\nB - Why you could get rid of this \"if\" statement, and what would it cost\nIf you get rid of the if, then in in theory all paunch services will tweak their associated scope files, and that will force a \"systemd daemon-reload\" at every \"systemctl start tripleo_{service}\" operation. I can\u0027t say if this has a big impact on the system, so I think we should limit the tweak to the service we know for sure need it.\n\nSo in summary, my position is threefold:\n- i think we can leave that if statement, to limit this tweak/hack to a few services.\n\n- getting rid of that if statement might add some load on the system, although it\u0027s unsure.\n\n- for undercloud and standalone only: eventually we may want to add some constraint to force mariadb/rabbit to stop after all other openstack containers, however we need to discuss how to do that in a way which would work with HA-containers, and that is out of the scope of that review IMHO.","commit_id":"b33aeea9728233aca852a3e132f23fca71ac42df"}]}
