-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[dhcp_relay] Disable dhcp_relay for ToRRouter switches type by the feature manager #7789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ | |
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled" | ||
| "state": "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}" | ||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
|
|
@@ -125,7 +125,7 @@ | |
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled" | ||
| "state": "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}" | ||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
|
|
@@ -157,7 +157,7 @@ | |
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled" | ||
| "state": "disabled" | ||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
|
|
@@ -181,9 +181,6 @@ | |
| }, | ||
| }, | ||
| "expected_subprocess_calls": [ | ||
| call("sudo systemctl unmask dhcp_relay.service", shell=True), | ||
| call("sudo systemctl enable dhcp_relay.service", shell=True), | ||
| call("sudo systemctl start dhcp_relay.service", shell=True), | ||
| call("sudo systemctl stop mux.service", shell=True), | ||
| call("sudo systemctl disable mux.service", shell=True), | ||
| call("sudo systemctl mask mux.service", shell=True), | ||
|
|
@@ -213,6 +210,99 @@ | |
| "memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M" | ||
| } | ||
| }, | ||
| "FEATURE": { | ||
| "dhcp_relay": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why use -ve logic? curious. |
||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "local", | ||
| "state": "{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %}enabled{% else %}always_disabled{% endif %}" | ||
|
||
| }, | ||
| "telemetry": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "True", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled", | ||
| "status": "enabled" | ||
| }, | ||
| }, | ||
| }, | ||
| "expected_config_db": { | ||
| "FEATURE": { | ||
| "dhcp_relay": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "disabled" | ||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "local", | ||
| "state": "always_disabled" | ||
| }, | ||
| "telemetry": { | ||
| "auto_restart": "enabled", | ||
| "has_global_scope": "True", | ||
| "has_per_asic_scope": "False", | ||
| "has_timer": "True", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled", | ||
| "status": "enabled" | ||
| }, | ||
| }, | ||
| }, | ||
| "expected_subprocess_calls": [ | ||
| call("sudo systemctl stop mux.service", shell=True), | ||
| call("sudo systemctl disable mux.service", shell=True), | ||
| call("sudo systemctl mask mux.service", shell=True), | ||
| call("sudo systemctl unmask telemetry.service", shell=True), | ||
| call("sudo systemctl unmask telemetry.timer", shell=True), | ||
| call("sudo systemctl enable telemetry.timer", shell=True), | ||
| call("sudo systemctl start telemetry.timer", shell=True), | ||
| ], | ||
| "popen_attributes": { | ||
| 'communicate.return_value': ('output', 'error') | ||
| }, | ||
| }, | ||
| ], | ||
| [ | ||
| "SingleToRCase_DHCP_Relay_Enabled", | ||
| { | ||
| "config_db": { | ||
| "DEVICE_METADATA": { | ||
| "localhost": { | ||
| "type": "ToR", | ||
| } | ||
| }, | ||
| "KDUMP": { | ||
| "config": { | ||
| "enabled": "false", | ||
| "num_dumps": "3", | ||
| "memory": "0M-2G:256M,2G-4G:320M,4G-8G:384M,8G-:448M" | ||
| } | ||
| }, | ||
| "FEATURE": { | ||
| "dhcp_relay": { | ||
| "auto_restart": "enabled", | ||
|
|
@@ -318,7 +408,7 @@ | |
| "has_timer": "False", | ||
| "high_mem_alert": "disabled", | ||
| "set_owner": "kube", | ||
| "state": "enabled" | ||
| "state": "{% if not (DEVICE_METADATA is defined and DEVICE_METADATA['localhost'] is defined and DEVICE_METADATA['localhost']['type'] is defined and DEVICE_METADATA['localhost']['type'] != 'ToRRouter') %}enabled{% else %}disabled{% endif %}" | ||
| }, | ||
| "mux": { | ||
| "auto_restart": "enabled", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.