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

Bugfix: require concat, not file #1350

Merged
merged 1 commit into from
Feb 1, 2016

Conversation

BobVincentatNCRdotcom
Copy link

The $ports_file is created via the concat resource, not the file resource.

Therefore, the related require attribute should reference concat, not file.

This also fixes bug 2850

@benhocker
Copy link
Contributor

👍

@benhocker
Copy link
Contributor

Looks like you might need to update line 507 of apache_spec.rb also?

      it { is_expected.to contain_file("/opt/rh/root/etc/httpd/conf/httpd.conf").with(
        'ensure'  => 'file',
        'notify'  => 'Class[Apache::Service]',
        'require' => ['Package[httpd]', 'File[/etc/httpd/conf/ports.conf]'],
      ) }

@jskarpe
Copy link

jskarpe commented Feb 1, 2016

Should really create a basic compile test as well. Currently something as simple as: class { 'apache': } fails to compile due to this issue

@tphoney
Copy link
Contributor

tphoney commented Feb 1, 2016

@rvincentatprokarmadotcom this looks like a popular fix, it is however breaking the unit tests. They will also need looked at.

Thanks for the work you have put in.

@BobVincentatNCRdotcom
Copy link
Author

On 02/01/2016 08:17 AM, Ben Hocker wrote:

Looks like you might need to update line 507 of apache_spec.rb also?

  it { is_expected.to contain_file("/opt/rh/root/etc/httpd/conf/httpd.conf").with(
    'ensure'  => 'file',
    'notify'  => 'Class[Apache::Service]',
    'require' => ['Package[httpd]', 'File[/etc/httpd/conf/ports.conf]'],
  ) }

Reply to this email directly or view it on GitHubhttps://github.com//pull/1350#issuecomment-177968481.

So mote it behttps://github.com/rvincentatprokarmadotcom/puppetlabs-apache/commit/2f78dab061378ed6e0e5b7c6aa670dd2625dea14.

Robert August Vincent II
(Pronounced Bob or Bob-Vee)
ProKarma DevOps Engineerhttps://www.prokarma.com/services-devops/automation
Cell: 757-986-9067

tphoney added a commit that referenced this pull request Feb 1, 2016
@tphoney tphoney merged commit 4c4ddaa into puppetlabs:master Feb 1, 2016
@BobVincentatNCRdotcom
Copy link
Author

So apparently the CI tests failed because Ubuntu Trusty does not contain the fastcgi module?

@tphoney
Copy link
Contributor

tphoney commented Feb 1, 2016

It is failing for all PRs at the minute, we will need to look closer into why. When i look at our jenkins pipelines, there is no such issue.

@BobVincentatNCRdotcom
Copy link
Author

Well, when I look at the results from the failing test case, I see:

Package libapache2-mod-fastcgi is not available, but is referred to by another package.

and

E: Package 'libapache2-mod-fastcgi' has no installation candidate

Notice: /Stage[main]/Main/Apache::Vhost[test.server]/Concat::Fragment[test.server-fastcgi]/File[/var/lib/puppet/concat/25-test.server.conf/fragments/280_test.server-fastcgi]/ensure: defined content as '{md5}451c2404fd69fe897bf5c64059e31b84'
Info: /Stage[main]/Main/Apache::Vhost[test.server]/Concat::Fragment[test.server-fastcgi]/File[/var/lib/puppet/concat/25-test.server.conf/fragments/280_test.server-fastcgi]: Scheduling refresh of Exec[concat_25-test.server.conf]
Notice: /Stage[main]/Apache::Mod::Fastcgi/File[fastcgi.conf]: Dependency Package[libapache2-mod-fastcgi] has failures: true
Notice: /Stage[main]/Apache::Mod::Fastcgi/Apache::Mod[fastcgi]/File[fastcgi.load]: Dependency Package[libapache2-mod-fastcgi] has failures: true
Notice: /Stage[main]/Apache::Mod::Fastcgi/Apache::Mod[fastcgi]/File[fastcgi.load symlink]: Dependency Package[libapache2-mod-fastcgi] has failures: true
Notice: /Stage[main]/Apache::Mod::Fastcgi/Apache::Mod[fastcgi]/File[fastcgi.conf symlink]: Dependency Package[libapache2-mod-fastcgi] has failures: true
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libapache2-mod-fastcgi' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package libapache2-mod-fastcgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libapache2-mod-fastcgi' has no installation candidate
Error: /Stage[main]/Apache::Mod::Fastcgi/Apache::Mod[fastcgi]/Package[libapache2-mod-fastcgi]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libapache2-mod-fastcgi' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Package libapache2-mod-fastcgi is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libapache2-mod-fastcgi' has no installation candidate

@BobVincentatNCRdotcom
Copy link
Author

See #1353

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

Successfully merging this pull request may close these issues.

5 participants