Skip to content

Instantly share code, notes, and snippets.

View Magisus's full-sized avatar

Maggie Dreyer Magisus

  • Puppet, Inc.
  • Portland, OR
View GitHub Profile
@Magisus
Magisus / gist:e17f1354f2294478754bff58de31967e
Created October 20, 2016 16:41
Executable structured fact tests on Windows 2012r2
Begin tests/external_facts/structured_executable_facts.rb
executable external facts can return structured data
xpmsl7lkvm2q6mk.delivery.puppetlabs.net (windows2012r2-64-1) 09:25:40$ cmd.exe /c facter kernelmajversion
6.3
xpmsl7lkvm2q6mk.delivery.puppetlabs.net (windows2012r2-64-1) executed in 0.38 seconds
* Agent xpmsl7lkvm2q6mk.delivery.puppetlabs.net: setup default external facts directory (facts.d)
@Magisus
Magisus / gist:0d19ccae4c9f7ce6f9e3afa823af5e86
Created October 20, 2016 16:44
Structured executable fact tests, Centos 7
Begin tests/external_facts/structured_executable_facts.rb
executable external facts can return structured data
j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) 09:21:52$ facter kernelmajversion
3.10
j9u4iawal8vmjbv.delivery.puppetlabs.net (centos7-64-1) executed in 0.08 seconds
* Agent j9u4iawal8vmjbv.delivery.puppetlabs.net: setup default external facts directory (facts.d)
This file has been truncated, but you can view the full file.
Started by upstream project "platform_puppet-agent_pkg-van-ship_daily-master" build number 386
originally caused by:
Started by upstream project "platform_puppet-agent_init-van-int_suite-daily-master" build number 298
originally caused by:
Started by an SCM change
[EnvInject] - Loading node environment variables.
Building remotely on baalzamon.delivery.puppetlabs.net-40510b81 (beaker swarm) in workspace /var/lib/jenkins/workspace/platform_puppet-agent_pkg-van-ship_daily-master/BUILD_TARGET/aix-6.1-ppc/SLAVE_LABEL/beaker
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
Run condition [Boolean condition] enabling prebuild for step [[Editable Email Notification]]
@Magisus
Magisus / sensitive_data_windows.txt
Last active November 11, 2016 21:58
Test run of sensitive_data_type test on Windows
Hosts:
2016-11-11 13:44:35 [+] vmpooler el-7-x86_64 lymtmf9ny6peqsw.delivery.puppetlabs.net (redhat7-64-1)
2016-11-11 13:44:35 [+] vmpooler windows-2012r2-64 kwcgcqr7koqz2ml.delivery.puppetlabs.net (windows2012r2-64-1)
2016-11-11 13:48:01 [-] vmpooler el-7-x86_64 lymtmf9ny6peqsw.delivery.puppetlabs.net (redhat7-64-1)
2016-11-11 13:48:01 [-] vmpooler windows-2012r2-64 kwcgcqr7koqz2ml.delivery.puppetlabs.net (windows2012r2-64-1)
Summary:
Test Suite: tests @ 2016-11-11 13:47:02 -0800
- Host Configuration Summary -
@Magisus
Magisus / rxgettext_help
Created December 2, 2016 20:02
rxgettext_help
Usage: /Users/aileen/.rbenv/versions/2.3.1/bin/rxgettext input.rb [-r parser.rb] [-o output.pot]
Extract translatable strings from given input files.
Specific options:
-o, --output=FILE write output to specified file
--package-name=NAME set package name in output
(PACKAGE)
--package-version=VERSION set package version in output
(VERSION)

From shell (both locally from zsh on Mac and bash on redhat-7) this works correctly, creating LC_MESSAGE dirs and corresponding MO files:

for dir in ./locales/*/ ; do [ -d "${dir}/LC_MESSAGES" ] || mkdir "${dir}/LC_MESSAGES" ; msgfmt "${dir}/puppet.po" -o "${dir}/LC_MESSAGES/puppet.mo" ; done ;

But when run from the vanagon configure step in these lines: https://github.com/Magisus/puppet-agent/blob/mo-generation/configs/components/puppet.rb#L101-L103, it the ${dir} is empty:

[ -d puppet ] || mkdir -p puppet
cd puppet && \
Ruby 2.3.3:
Warning: /opt/puppetlabs/puppet/lib/ruby/2.3.0/openssl/ssl.rb:318:in `post_connection_check' /opt/puppetlabs/puppet/lib/ruby/2.3.0/net/http.rb:944:in `connect' /opt/puppetlabs/puppet/lib/ruby/2.3.0/net/http.rb:863:in `do_start' /opt/puppetlabs/puppet/lib/ruby/2.3.0/net/http.rb:858:in `start' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/pool.rb:83:in `borrow' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/pool.rb:25:in `with_connection' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:217:in `with_connection' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:175:in `block in request_with_redirects' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:172:in `upto' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:172:in `request_with_redirects' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:116:in `put' /opt/puppetlabs/pupp
Failed Tests Cases:
Test Case ./tests/ensure_puppet-agent_paths.rb reported: #<Beaker::DSL::Outcomes::FailTest:
Failed to find expected binary '/usr/bin/mco.bat' on agent 'q4sfil251ilvy5w.delivery.puppetlabs.net'
>
Test line: ./tests/ensure_puppet-agent_paths.rb:167:in `block (3 levels) in run_test'
Test Case ./tests/language/server_set_facts.rb reported: #<Minitest::Assertion: q4sfil251ilvy5w.delivery.puppetlabs.net: $server_facts should error if overwritten.
Expected /Error.*Attempt to assign to a reserved variable name: 'server_facts'/ to match "C:/cygwin64/lib/ruby/gems/2.4.0/gems/CFPropertyList-2.2.8/lib/cfpropertylist/rbCFTypes.rb:24: warning: constant ::Fixnum is deprecated\n\e[1;33mWarning: Unable to fetch my n
- Specific Test Case Status -
Failed Tests Cases:
Test Case ./tests/lookup/v3_config_and_data.rb reported: #<Minitest::Assertion: 4: lookup subcommand didn't exit properly: (1)>
Test line: ./tests/lookup/v3_config_and_data.rb:94:in `block (4 levels) in run_test'
Test Case ./tests/lookup/v4_hieradata_with_v5_configs.rb reported: #<Minitest::Assertion: 1: lookup subcommand didn't exit properly: (1)>
Test line: ./tests/lookup/v4_hieradata_with_v5_configs.rb:88:in `block (4 levels) in run_test'
Errored Tests Cases:
Test Case ./tests/ticket_3360_allow_duplicate_csr_with_option_set.rb reported: #<RuntimeError: PuppetAcceptance::DSL::Helpers.with_puppet_running_on failed (check backtrace for location) because: Host 'xxsovj8gk5bzq0e.delivery.puppetlabs.net' exited with 24 running:
puppet cert --sign --all
@Magisus
Magisus / puppetserver-build-stacktrace.txt
Created August 11, 2017 20:49
Puppetserver build stacktrace
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact puppetlabs:puppetserver:jar:5.0.1-master-20170811.202035-167 in snapshots (http://nexus.delivery.puppetlabs.net/content/repositories/snapshots/)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifacts(DefaultRepositorySystem.java:294)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:93)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:28)