Skip to content

Commit

Permalink
[ctgmgr]: do not remove label when do systemd service stop when servi…
Browse files Browse the repository at this point in the history
…ce is in kube mode (sonic-net#15642) (sonic-net#15846)
  • Loading branch information
mssonicbld authored Jul 14, 2023
1 parent ffa84ce commit c2b7ed3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/sonic-ctrmgrd/ctrmgr/container
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 0 additions & 5 deletions src/sonic-ctrmgrd/tests/container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,6 @@
"container_id": "",
"container_version": "20201230.1.15"
}
},
common_test.KUBE_LABEL_TABLE: {
"SET": {
"snmp_enabled": "false"
}
}
}
},
Expand Down

0 comments on commit c2b7ed3

Please sign in to comment.