Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cmd/nodecfg/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var applyRootDir string
var applyRootNodeDir string
var applyPublicAddress string
var nodeConfigBucket string
var disableDNS bool

func init() {
applyCmd.Flags().StringVarP(&applyChannel, "channel", "c", "", "Channel for the nodes we are configuring")
Expand All @@ -49,6 +50,8 @@ func init() {
applyCmd.Flags().StringVarP(&applyPublicAddress, "publicaddress", "a", "", "The public address to use if registering Relay or for Metrics")

applyCmd.Flags().StringVarP(&nodeConfigBucket, "bucket", "b", "", "S3 bucket to get node configuration from.")

applyCmd.Flags().BoolVarP(&disableDNS, "disable-dns", "N", false, "disable setting DNS entries")
}

var applyCmd = &cobra.Command{
Expand Down Expand Up @@ -122,7 +125,7 @@ func doApply(rootDir string, rootNodeDir, channel string, hostName string, dnsNa
return fmt.Errorf("configuration does not include this host: %s", hostName)
}

if hostNeedsDNSName(hostCfg) && dnsName == "" {
if hostNeedsDNSName(hostCfg) && dnsName == "" && !disableDNS {
return fmt.Errorf("publicaddress is required - Host contains Relays or exposes Metrics")
}

Expand Down
4 changes: 2 additions & 2 deletions netdeploy/remote/nodecfg/nodeConfigurator.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (nc *nodeConfigurator) apply(rootConfigDir, rootNodeDir string) (err error)

for _, nodeDir := range nodeDirs {
nodeDir.delaySave = true
err = nodeDir.configure(nc.dnsName)
err = nodeDir.configure()
if err != nil {
break
}
Expand All @@ -96,7 +96,7 @@ func (nc *nodeConfigurator) apply(rootConfigDir, rootNodeDir string) (err error)
nodeDir.saveConfig()
}

if err == nil {
if err == nil && nc.dnsName != "" {
fmt.Fprint(os.Stdout, "... registering DNS / SRV records\n")
err = nc.registerDNSRecords()
}
Expand Down
2 changes: 1 addition & 1 deletion netdeploy/remote/nodecfg/nodeDir.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type nodeDir struct {
// * EnableBlockStats
// * DashboardEndpoint
// * DeadlockOverride
func (nd *nodeDir) configure(dnsName string) (err error) {
func (nd *nodeDir) configure() (err error) {
fmt.Fprintf(os.Stdout, "Configuring Node %s\n", nd.Name)
if err = nd.configureRelay(nd.IsRelay()); err != nil {
fmt.Fprintf(os.Stdout, "Error during configureRelay: %s\n", err)
Expand Down