Browse Source

Fix _get_hostname call

master
Sean Johnson 4 years ago
parent
commit
43392961e0
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 9FA15B87469EA850
  1. 14
      _grains/from_grainsrv.py

14
_grains/from_grainsrv.py

@ -125,14 +125,14 @@ def __virtual__():
return False, msg
# Test grainsrv health
query = _build_grainsrv_query(cfg)
query["decode"] = False
query["status"] = True
try:
query = _build_grainsrv_query(cfg)
query["decode"] = False
query["status"] = True
url = _urljoin(query["url"], "/health")
query["url"] = url
url = _urljoin(query["url"], "/health")
query["url"] = url
try:
resp = http.query(**query)
if resp["status"] != http_client.OK:
log.error("grainsrv is not OK: %s", resp["body"])
@ -177,7 +177,7 @@ def _get_hostname(cfg):
def _build_grainsrv_query(cfg):
name = _get_hostname()
name = _get_hostname(cfg)
scheme = "https" if cfg["use_https"] else "http"
host = cfg["host"]
port = cfg["port"]

Loading…
Cancel
Save