[ctgmgr]: do not remove label when do systemd service stop when service is in kube mode (#15642) (#15878)

This commit is contained in:
mssonicbld 2023-07-19 20:10:41 +08:00 committed by GitHub
parent ff5c03f91b
commit 18b446bfe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 6 deletions

View File

@ -288,7 +288,7 @@ def container_stop(feature, **kwargs):
set_owner, _ , _ = read_config(feature)
current_owner, remote_state, _ = read_state(feature)
docker_id = container_id(feature)
remove_label = (remote_state != "pending") or (set_owner == "local")
remove_label = (set_owner == "local")
debug_msg("{}: set_owner:{} current_owner:{} remote_state:{} docker_id:{}".format(
feature, set_owner, current_owner, remote_state, docker_id))

View File

@ -244,11 +244,6 @@ stop_test_data = {
"container_id": "",
"container_version": "20201230.1.15"
}
},
common_test.KUBE_LABEL_TABLE: {
"SET": {
"snmp_enabled": "false"
}
}
}
},