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

service upstream may not have port #1282

Open
hbog opened this issue Dec 10, 2018 · 1 comment · May be fixed by #1283
Open

service upstream may not have port #1282

hbog opened this issue Dec 10, 2018 · 1 comment · May be fixed by #1283

Comments

@hbog
Copy link
Contributor

hbog commented Dec 10, 2018

The service parameter of the nginx::resource::upstream::member enables port discovery via DNS SRV records. When it is used, a server port must not be specified. Currently the module adds port 80 by default resulting in nginx failing to start.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet:all
  • Ruby:all
  • Distribution:all
  • Module version: v0.15.0

How to reproduce (e.g Puppet code you use)

nginx::resource::upstream { 'backend':
  zone    => $zone,
  ensure  => present,
  members => {
    'backend' => {
      'server'  => "upstream.endpoints.cluster.local",
      'service' => 'http',
      'resolve'  =>  true,
    }
  }
}

What are you seeing

nginx startup fails because the upstream .conf file specifies the default port 80

upstream backend {
  server upstream.endpoints.cluster.local:80 service=http resolve;
}

What behaviour did you expect instead

The resulting upstream .conf file should not define a port

upstream backend {
  server upstream.endpoints.cluster.local service=http resolve;
}

Output log

nginx: [emerg] service upstream may not have port

Any additional information you'd like to impart

@hbog
Copy link
Contributor Author

hbog commented Dec 10, 2018

Fixed in PR 1283

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

Successfully merging a pull request may close this issue.

1 participant