Giter VIP home page Giter VIP logo

Comments (16)

ozbillwang avatar ozbillwang commented on June 22, 2024

I uninstalled puppet-omnibus package, and install again, get same error when run puppet command.

I uninstalled puppet-omnibus package and install with yum install puppet-3.3.1 facter hiera, no issue found.

from puppet-rundeck.

liamjbennett avatar liamjbennett commented on June 22, 2024

Once you have it installed can you check the output of the /etc/facter/facts.d/rundeck_version script? Given the error you are seeing is with facter perhaps this fact is returning something erroneous.

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

puppet environment is broken with puppet-omnibus, but with puppetlabs puppet, i still can see this error:

/usr/lib/ruby/site_ruby/1.8/facter/util/directory_loader.rb:80: command not found: /etc/facter/facts.d/rundeck_version
Fact file /etc/facter/facts.d/rundeck_version was parsed but returned an empty data set

If I directly run it with bash, no output

[root@rundeck log]# cat rundeck_version

if [ -x /usr/bin/dpkg ]; then
  VERSION=`dpkg -l | grep rundeck | awk '{ print $3}'`
  echo "rundeck_version=$VERSION"
fi
[root@rundeck log]# bash /etc/facter/facts.d/rundeck_version
[root@rundeck log]#

Read the content in it, our system is CentOS 6.5, and dpkg is not installed by default.

Linux version is CentOS 6.5

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

Yes, your prompt gives me the way to fix it. After install dpkg package, the problem is fixed.

Maybe i can help to fix this issue to add centos support. In CentOS, I run below yum command to get rundeck version.

yum list installed |grep rundeck
rundeck.noarch              2.5.0-1.6.GA       @bintray-rundeck
rundeck-config.noarch       2.5.0-1.6.GA       @bintray-rundeck

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

Find the code in manifests/config.pp

  ensure_resource('file', ['/etc/facter', '/etc/facter/facts.d'], {'ensure' => 'directory'})

  file { '/etc/facter/facts.d/rundeck_version':
    ensure => present,
    source => 'puppet:///modules/rundeck/rundeck_version',
    owner  => root,
    group  => root,
    mode   => '0755'
  }

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

i see, the problem is fixed by #42

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

this change (b4bc451) makes trouble.

I faced some issues (#45) which I think it is fixed by #42 and apply the latest commit.

After apply the new change, i saw more errors:

# puppet agent -t
/opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/resolution.rb:171:in ``': Interrupt
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/resolution.rb:171:in `block in exec'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/resolution.rb:130:in `with_env'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/resolution.rb:156:in `exec'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/parser.rb:120:in `results'
...
/opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/parser.rb:73:in `parse': undefined method `each_line' for nil:NilClass (NoMethodError)
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/parser.rb:120:in `results'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/directory_loader.rb:61:in `block in load'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/directory_loader.rb:55:in `each'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/directory_loader.rb:55:in `load'

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

If I run below command,

[root@rundeck log]# facter |grep rundeck
Write failed: Broken pipe

from puppet-rundeck.

liamjbennett avatar liamjbennett commented on June 22, 2024

Ok, that's a little unusual. Thank's for the PR.

I want to take a look into this a bit more and write some tests first so I can understand the problem a bit better.

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

For anyone who has the same issue, you need stick on commit f8f1ddd (release v1.1.0).

Here is my work around. Put below code before you call include rundeck.

  file { '/var/lib/dpkg':
    ensure => directory,
  }
  file { '/var/lib/dpkg/updates':
    ensure => directory,
  }
  file { '/var/lib/dpkg/status':
    ensure => file,
  }
  file { '/var/lib/dpkg/available':
    ensure => file,
  }
  package { 'dpkg':
    ensure  => installed,
    require => File['/var/lib/dpkg','/var/lib/dpkg/updates','/var/lib/dpkg/status','/var/lib/dpkg/available']
  }

from puppet-rundeck.

liamjbennett avatar liamjbennett commented on June 22, 2024

Thanks @SydOps this is very useful.

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

@liamjbennett

Will any above commits to be merged soon? wcooley@5520b31 or 88c85e8

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

ic, wcooley@5520b31 has been merged.
This issue can be closed now.

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

I can confirm this issue has been fixed properly, I needn't install dpkg in centos as work around any more.

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

I start from a new system (rundeck is not installed) and then i saw the issue again. Seems the problem is not fixed in puppet-omnibus

root@rundeck facts.d]# puppet agent -t --noop
/opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/parser.rb:73:in `parse': undefined method `each_line' for nil:NilClass (NoMethodError)
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/parser.rb:120:in `results'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/directory_loader.rb:61:in `block in load'
    from /opt/puppet-omnibus/embedded/lib/ruby/gems/2.0.0/gems/facter-1.7.3/lib/facter/util/directory_loader.rb:55:in `each'

[root@rundeck facts.d]# facter fqdn
Could not retrieve fqdn: undefined method `each_line' for nil:NilClass

The code around line 73:

  module KeyValuePairOutputFormat
    def self.parse(output)
      result = {}
      re = /^(.+?)=(.+)$/
      output.each_line do |line|
        if match_data = re.match(line.chomp)
          result[match_data[1]] = match_data[2]
        end
      end
      result
    end
  end

from puppet-rundeck.

ozbillwang avatar ozbillwang commented on June 22, 2024

We are planning to get rid of puppet-omnibus from our system, since this issue is only reported with puppet-omnibus, and I have work around to resolve it, this issue should be fine to be closed now.

from puppet-rundeck.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.