Skip to content

Commit

Permalink
Default the managerhosts value to 127.0.0.1
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
  • Loading branch information
rhatdan committed Apr 19, 2023
1 parent 55fa9c3 commit d264751
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/agent/hirte-default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NodeName=

#
# The IP address that hirte-agent can use to connect to hirte manager. It must be a valid IPv4 or IPv6 address.
# It's mandatory to set either ManagerHost or ManagerAddress option for each hirte-agent.
# ManagerHost defaults to localhost 127.0.0.1. It's mandatory to set this field if the hirte agent is on a remote system.
ManagerHost=

#
Expand Down
3 changes: 1 addition & 2 deletions doc/man/hirte-agent.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ options. The option doesn't have a default value.

#### **ManagerHost** (string)

The host used by `hirte-agent` to connect to `hirte`. Must be a valid IPv4 or IPv6. The option doesn't have a default
value, it's mandatory to set this option for each hirte-agent.
The host used by `hirte-agent` to connect to `hirte`. Must be a valid IPv4 or IPv6. ManagerHost defaults to localhost 127.0.0.1. It's mandatory to set this field if the hirte agent is on a remote system.

#### **ManagerPort** (uint16_t)

Expand Down
1 change: 1 addition & 0 deletions src/agent/agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ Agent *agent_new(void) {
agent->event = steal_pointer(&event);
agent->api_bus_service_name = steal_pointer(&service_name);
agent->port = HIRTE_DEFAULT_PORT;
agent->host = strdup(HIRTE_DEFAULT_HOST);
agent->heartbeat_interval_msec = AGENT_HEARTBEAT_INTERVAL_MSEC;
LIST_HEAD_INIT(agent->outstanding_requests);
LIST_HEAD_INIT(agent->tracked_jobs);
Expand Down
1 change: 1 addition & 0 deletions src/libhirte/common/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "errno.h"

#define HIRTE_DEFAULT_PORT 842
#define HIRTE_DEFAULT_HOST "127.0.0.1"

#define HIRTE_DBUS_NAME "org.containers.hirte"
#define HIRTE_AGENT_DBUS_NAME "org.containers.hirte.Agent"
Expand Down

0 comments on commit d264751

Please sign in to comment.