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
hosts.rm_host changes /etc/hosts file with odd characters #49150
Comments
can you paste the command you are running? |
@Ch3LL Hi, I used curl as the http client and call salt-api to modify /etc/hosts.
Here are screenshots which may be helpful: I just found another issue which may be relative with mine: Thank you. |
i'm having a hard time replicating this:
how often does this occur? |
Very strange, nearly almost in my case . |
Hi @Ch3LL , just get some more info:
Hope that will do some help when you replicate this problem. |
okay looks like i'm able to replicate this. It only occurs in the following situations:
To note this does not affect the /etc/hosts file only the output from list_hosts |
Hi, I am able to replicate this problem with:
|
can you paste the command you are running? I was never even able to replicate this problem on centos7 |
salt-master
salt-minion
I install salt by running |
ahh python3. in your initial versions report it shows python2. With python3 i can replicate this. As noted above though it does remove the entry and the file looks good. |
Oh, sorry for obscure description.
It seems that the version of CentOS is not the key. I modified(just changed some codes, perhaps my code looks "ugly" but it works) the implementation of function Glad to paste my code here or submit a pull request if you are interested in that. |
yeah we would love a PR :) That would be great |
Dear all:
I am using Saltstack to modify /etc/hosts file.
Sometimes I just found salt-minion modified my /etc/hosts with odd characters.
Here is some minion log(I obscured some IP&username info):
And sometimes the same command can run correctly on the same machine:
So does anybody give me some tips about this?
Thanks a lot!
The text was updated successfully, but these errors were encountered: