sonic-host-services's People
Forkers
fastiuk vdahiya12 kamelnetworks zmegolaz bluecmd wenyiz2021 liuh-80 zhaohuis sujinmkang junchao-mellanox suvarnameenakshi abdosi anamehra judyjoseph maipbui pettershao-ragilenetworks stephenxs liushilongbuaa mlok-nokia isabelmsft ycohenvidia saiarcot895 dgsudharsan dmytroxintel ganglyu zbud-msft chiourung oleksandrivantsiv xumia iavraham yanjundeng keboliu genesiscloud kuanyu99 dbarashinvd sviatoslavboichuk davidzagury vivekrnv robertlperry i-davydenko adyeung brholmes1 saravanan-i chrisy97 davidpil2002 nmoray sunhorus yaqiangz deepak-singhal0408 pterosaur vishantinet jhli-cisco yxieca mssonicbld dprital fengpan-frank lizhijianrd vtarnavsky xincunli-sonic assrinivasan shihhsien-wang ashish12pantsonic-host-services's Issues
[hostcfgd] wrong behavior for disable_feature
In enable_feature:
for suffix in feature_suffixes:
cmds.append("sudo systemctl unmask {}.{}".format(feature_name, suffix))
cmds.append("sudo systemctl enable {}.{}".format(feature_name, feature_suffixes[-1]))
cmds.append("sudo systemctl start {}.{}".format(feature_name, feature_suffixes[-1]))
While in disable_feature, this iteration looks wrong:
for suffix in reversed(feature_suffixes):
cmds.append("sudo systemctl stop {}.{}".format(feature_name, suffix))
cmds.append("sudo systemctl disable {}.{}".format(feature_name, feature_suffixes[-1]))
cmds.append("sudo systemctl mask {}.{}".format(feature_name, feature_suffixes[-1]))
My idea is to change to:
for suffix in reversed(feature_suffixes):
cmds.append("sudo systemctl stop {}.{}".format(feature_name, suffix))
cmds.append("sudo systemctl disable {}.{}".format(feature_name, suffix))
cmds.append("sudo systemctl mask {}.{}".format(feature_name, suffix))
Let's say,
telemetry has feature_suffixes = ['service', 'timer']
enable_feature:
sudo systemctl unmask t.service
sudo systemctl unmask t.timer
sudo systemctl enable t.timer
sudo systemctl start t.timer
=> ok
disable_feature:
sudo systemctl stop t.timer
sudo systemctl disable t.timer
sudo systemctl mask t.timer
sudo systemctl stop t.service
sudo systemctl disable t.timer ?? why do it again
sudo systemctl mask t.timer ??
With new change:
disable:
sudo systemctl stop t.timer
sudo systemctl disable t.timer
sudo systemctl mask t.timer
sudo systemctl stop t.service
sudo systemctl disable t.service
sudo systemctl mask t.service
dhcp has [service]
enable:
sudo systemctl unmask d.service
sudo systemctl enable d.service
sudo systemctl start d.service
=>ok
disable:
sudo systemctl stop d.service
sudo systemctl disable d.service
sudo systemctl mask d.service
=>ok
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.