Skip to content
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

Windows 11 profiles are not set #83

Open
nick81nrw opened this issue Mar 30, 2022 · 0 comments
Open

Windows 11 profiles are not set #83

nick81nrw opened this issue Mar 30, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@nick81nrw
Copy link

Describe the bug
On Windows 11 hostctl do not set or list profiles when use "add/list" command. It seems to be a parsing error in hosts file.

I use Netmaker on Windows and hostctl sets every few minutes new entries in hosts file. Netmaker gets other peers IP addresses over mqtt and set hosts entries with hostctl

To Reproduce
Steps to reproduce the behavior:

hostctl.exe add TEST1 -f hosts.txt
OR
hostctl.exe add domains TEST1 test.loc --ip 10.10.10.10

hosts (looks correct):

##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################

# profile.on TEST1
10.10.10.10 test.loc
# end

hostctl.exe list
No profile is shown

+---------+--------+-----------------+-------------------+
| PROFILE | STATUS |       IP        |      DOMAIN       |  
+---------+--------+-----------------+-------------------+  
| default | off    | 102.54.94.97    | rhino.acme.com    |  
| default | off    | 38.25.63.10     | x.acme.com        |  
| default | off    | 127.0.0.1       | localhost         |  
| default | off    | ::1             | localhost         |  
| default | on     | 10.10.10.10     | test.loc          |  
+---------+--------+-----------------+-------------------+

hostctl.exe add domains TEST2 test2.loc --ip 10.10.10.11
hosts file seams not correct parsed. Profile name is set. Content-block is set under first profile.

# profile.on TEST1
10.10.10.10 test.loc

##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################

# profile.on TEST2
10.10.10.11 test2.loc
# end

hostctl.exe list
No profile

+---------+--------+---------------+-------------------+
| PROFILE | STATUS |      IP       |      DOMAIN       |
+---------+--------+---------------+-------------------+
| default | off    | 102.54.94.97  | rhino.acme.com    |
| default | off    | 38.25.63.10   | x.acme.com        |
| default | off    | 127.0.0.1     | localhost         |
| default | off    | ::1           | localhost         |
| default | on     | 10.10.10.10   | test.loc          |
| default | on     | 10.10.10.11   | test2.loc         |
+---------+--------+---------------+-------------------+

hostctl do not find profiles

hostctl.exe disable TEST2
[×] error: unknown profile name
hostctl.exe disable TEST
[×] error: unknown profile name

Expected behavior
Set and list profiles under windows

System (please complete the following information):

  • OS: Windows
  • Version: 11
@nick81nrw nick81nrw added the bug Something isn't working label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants