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

hoverctl not loading config.yaml on first start #704

Closed
jrtaisto opened this issue Mar 8, 2018 · 3 comments
Closed

hoverctl not loading config.yaml on first start #704

jrtaisto opened this issue Mar 8, 2018 · 3 comments
Labels
Milestone

Comments

@jrtaisto
Copy link

jrtaisto commented Mar 8, 2018

ENV:
OS: CentOS 7
Running as non-root account

Version:

hoverfly@localhost ~> hoverctl version

+----------+----------+
| hoverctl | |
| hoverfly | v0.15.1 |
+----------+----------+

Conditions: Install bits for hoverfly, use pre-configured .hoverfly/config.yaml, and do the following:

hoverfly@localhost ~> hoverctl status
Could not connect to Hoverfly at localhost:8888

hoverfly@localhost ~> cat .hoverfly/config.yaml
default: local
targets:
local:
name: local
host: localhost
admin.port: 8888
proxy.port: 8500
authenabled: false
username: "test"
password: "test123"

  1. First command run with environment setup.

hoverfly@localhost ~> hoverctl config
/home/hoverfly/.hoverfly/config.yaml
default: local
targets:
local:
name: local
host: localhost
admin.port: 8888
proxy.port: 8500
authenabled: false
username: "test"
password: "test123"

The above is expected. Put in a default username password but haven't enabled auth yet.

  1. Verify that nothing is running.

hoverfly@localhost ~> hoverctl status
Could not connect to Hoverfly at localhost:8888

  1. Check your configuration again.

hoverfly@localhost ~> hoverctl config
/home/hoverfly/.hoverfly/config.yaml
default: local
targets:
local:
name: local
host: localhost
admin.port: 8888
proxy.port: 8500
authenabled: false
username: ""
password: ""

Yikes!! Why the clean slate? I didn't use hoverctl or hoverfly to modify the local config, but yet it changed. It seems to do the same thing no matter what you do pertaining to hoverctl start|status|stop which doesn't make any sense. The config.yaml should be persistent and should only change if you're locally changing things with hoverctl/hoverfly or if you're managing this instance remotely via hoverctl.

@tommysitu tommysitu added the bug label Mar 12, 2018
@tommysitu
Copy link
Member

tommysitu commented Mar 12, 2018

hoverctl is loading config.yaml fine. I think the bug is to do with hoverctl removes
the username and password if auth is disabled.

@jrtaisto
Copy link
Author

jrtaisto commented Mar 12, 2018 via email

@tommysitu
Copy link
Member

@jrtaisto thank you for reporting this issue. It was caused by hoverctl resetting optional fields when parsing the config file. Sorted in the upcoming RC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants