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

docker::run fails with upstart and strict variables #312

Closed
dmnfortytwo opened this issue Aug 14, 2018 · 1 comment
Closed

docker::run fails with upstart and strict variables #312

dmnfortytwo opened this issue Aug 14, 2018 · 1 comment
Milestone

Comments

@dmnfortytwo
Copy link

dmnfortytwo commented Aug 14, 2018

What you expected to happen?

My manifest to apply

  include docker
  docker::image {'bitsensor/elastalert:latest': }
  docker::run { 'elastalert':
    image            => 'bitsensor/elastalert:latest',
    detach           => true,
    service_prefix   => 'docker-',
    net              => 'host',
    disable_network  => false,
    volumes          => [
      '/opt/elastalert/config/elastalert.yaml:/opt/elastalert/config.yaml',
      '/opt/elastalert/config/config.json:/opt/elastalert-server/config.yaml',
      '/opt/elastalert/rules:/opt/elastalert/rules',
      '/opt/elastalert/rule_templates:/opt/elastalert/rule_templates',
      '/opt/elastalert/logs:/var/log',
    ],
    restart_service  => true,
    privileged       => false,
    pull_on_start    => false,
    read_only        => false,
    extra_parameters => [ '--restart=always' ],
  }

What happened?

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Illegal relationship operand, can not form a relationship with an Undef Value. A Catalog type is required. (file: /etc/puppetlabs/code/environments/production/modules/docker/manifests/run.pp, line: 465, column: 46) (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 163) on node benchmark-gce-be-1

How to reproduce it?

Run on ubuntu 14.04 with upstart support.

Anything else we need to know?

I've checked - $runscript is Undef, which is quite expected for upstart. And changing relations with Undef fails with strict variables enabled.

Versions:

root@benchmark-gce-be-1:/opt/elastalert# puppet --version
5.5.1
root@benchmark-gce-be-1:/opt/elastalert# docker version
Client:
 Version:      18.03.1-ce
 API version:  1.37
 Go version:   go1.9.5
 Git commit:   9ee9f40
 Built:        Thu Apr 26 07:18:46 2018
 OS/Arch:      linux/amd64
 Experimental: false
 Orchestrator: swarm

Server:
 Engine:
  Version:      18.03.1-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.5
  Git commit:   9ee9f40
  Built:        Thu Apr 26 07:16:59 2018
  OS/Arch:      linux/amd64
  Experimental: false
root@benchmark-gce-be-1:/opt/elastalert# facter os
{
  architecture => "amd64",
  distro => {
    codename => "trusty",
    description => "Ubuntu 14.04.5 LTS",
    id => "Ubuntu",
    release => {
      full => "14.04",
      major => "14.04"
    }
  },
  family => "Debian",
  hardware => "x86_64",
  name => "Ubuntu",
  release => {
    full => "14.04",
    major => "14.04"
  },
  selinux => {
    enabled => false
  }
}
root@admin-gce-be-1:~# puppet module list
├── puppet-letsencrypt (v2.0.1)
├── puppet-nginx (v0.11.0)
├── puppetlabs-apt (v4.5.1)  invalid
├── puppetlabs-concat (v4.2.1)
├── puppetlabs-docker (v2.0.0)
├── puppetlabs-inifile (v1.2.0)  invalid
├── puppetlabs-lvm (v1.0.1)
├── puppetlabs-stdlib (v4.25.1)
├── puppetlabs-vcsrepo (v1.2.0)  invalid
├── thias-sysctl (v1.0.6)
└── wywygmbh-fluentd (v0.6.0)
+ dozens of in-house modules
@davejrt
Copy link
Contributor

davejrt commented Aug 14, 2018

This has been fixed in PR #304 and will be included in the next release, shortly.

@davejrt davejrt closed this as completed Aug 14, 2018
@MWilsonPuppet MWilsonPuppet added this to the V3.0.0 milestone Sep 26, 2018
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

No branches or pull requests

3 participants