Suhan Dharmasuriya
Suhan Dharmasuriya

Reputation: 303

puppet catalog run error Error 400 on SERVER: Not authorized to call find on /<path/to/my/file>

I recently updated my ubuntu 12.04 VM instances (in OpenStack) to ubuntu 14.04 of which puppet master and puppet agent separately installed. While doing the OS upgrade my puppet master and agent both upgraded from 2.7.11 to 3.4.3.

I ran a sample test puppet catalog run by simply creating a file in agent's /tmp directory and it was successful.

But when I tried to move files from my master to agent node I'm getting the following error [which was working fine before puppet upgrade]. I have several modules inside /etc/puppet/modules/ which was working fine with puppet 2.7.11

    root@appserver-mgr:~# puppet agent --test
    Info: Retrieving plugin
    Info: Loading facts in /var/lib/puppet/lib/facter/java_home.rb
    Info: Caching catalog for appserver-mgr.openstacklocal
    Info: Applying configuration version '1416908414'
    Notice:                 /Stage[main]/Appserver::Config_mgr/Exec[Stop_process_and_remove_CARBON_HOME]/returns: executed successfully
    Notice: /Stage[main]/Appserver::Config_mgr/Exec[remove_java_dirs]/returns: executed successfully
    Error: /Stage[main]/Appserver::Config_mgr/File[/opt/wso2as-5.2.1.zip]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/appserver/wso2as-5.2.1.zip with {:links=>"manage"} Could not retrieve file metadata for puppet:///appserver/wso2as-5.2.1.zip: Error 400 on SERVER: Not authorized to call find on /file_metadata/appserver/wso2as-5.2.1.zip with {:links=>"manage"}
    Error: /Stage[main]/Appserver::Config_mgr/File[/opt/jdk1.6.0_24.tar.gz]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/packs/jdk1.6.0_24.tar.gz with {:links=>"manage"} Could not retrieve file metadata for puppet:///packs/jdk1.6.0_24.tar.gz: Error 400 on SERVER: Not authorized to call find on /file_metadata/packs/jdk1.6.0_24.tar.gz with {:links=>"manage"}`

puppet class file contents:

    file { '/opt/wso2as-5.2.1.zip':
            replace => "no",
            ensure => present,
            source => "puppet:///appserver/wso2as-5.2.1.zip",
    }

    file { '/opt/jdk1.6.0_24.tar.gz':
            replace => "no",
            ensure => present,
            source => "puppet:///packs/jdk1.6.0_24.tar.gz",
    }

My files locations have also not been changed.

Glad if anyone can provide a direction to proceed from here.

Upvotes: 0

Views: 5691

Answers (1)

Suhan Dharmasuriya
Suhan Dharmasuriya

Reputation: 303

Found the answer.

    file { '/opt/wso2as-5.2.1.zip':
            replace => "no",
            ensure => present,
            source => "puppet:///modules/appserver/wso2as-5.2.1.zip",
    }

    file { '/opt/jdk1.6.0_24.tar.gz':
            replace => "no",
            ensure => present,
            source => "puppet:///modules/packs/jdk1.6.0_24.tar.gz",
    }

After puppet upgrade, I had to rename file path by adding a /modules/ section after ///

Earlier versions worked without modules/ part, albeit it was deprecated since Puppet v 0.25. See the details here: http://docs.puppetlabs.com/puppet/3/reference/release_notes.html#break-puppet-urls-pointing-to-module-files-must-contain-modules

Then the puppet catalog run was successful for the new version.

Upvotes: 1

Related Questions