Code Monkey home page Code Monkey logo

sonic-host-services's People

Contributors

abdosi avatar anamehra avatar arlakshm avatar bluecmd avatar davidpil2002 avatar dgsudharsan avatar fastiuk avatar fengpan-frank avatar ganglyu avatar isabelmsft avatar jleveque avatar judyjoseph avatar junchao-mellanox avatar liuh-80 avatar liushilongbuaa avatar maipbui avatar mlok-nokia avatar prsunny avatar saiarcot895 avatar shlomibitton avatar stepanblyschak avatar sujinmkang avatar suvarnameenakshi avatar vaibhavhd avatar vdahiya12 avatar vivekrnv avatar xumia avatar ycohenvidia avatar yozhao101 avatar zhaohuis avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonic-host-services's Issues

sshd: Too many authentication failures

Using the instructions at https://sonic.software/ to launch the sonic-vs image in QEMU, SSH fails to connect to master and 202405 builds with the following error:

❯ ssh admin@localhost -p 5555
Debian GNU/Linux 12 \n \l

Received disconnect from 127.0.0.1 port 5555:2: Too many authentication failures
Disconnected from 127.0.0.1 port 5555

Comparing the relevant parts of /etc/ssh/sshd_config, it appears that MaxAuthTries is set to too low of a value. If I increase this to 6 (the commented value), or remove the line completely, then it is possible to make a connection.

202311 builds:

# Close inactive client sessions after 15 minutes
ClientAliveInterval 900
ClientAliveCountMax 0
LogLevel VERBOSE

Master and 202405 builds

# Close inactive client sessions after 5 minutes
ClientAliveInterval 300
ClientAliveCountMax 0
MaxAuthTries 3
Banner /etc/issue
LogLevel VERBOSE

I suspect this is a result of the bump from Debian 11 to 12.
It's possible that #99 contains a fix, but I haven't tested the patches to confirm.

[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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.