This will allow to run puppet with environment variables.
E.g. FACTER_foo=bar puppet apply ...
Change-Id: I1e435262e810ead46689078513607f6a99a19043
Implements: blueprint get-rid-cobbler-dnsmasq
(cherry picked from commit c734b03042)
This parameter is required for Puppet 4
to be able to find the base modules without
any environment defined.
Puppet 3 is able to work in the legacy mode
without the environment support and does not
case if there is base module path or not.
Closes-Bug: 1655663
Change-Id: I60f2c78ef5fe366314eea186f4671d198e54f1d6
Set reports to none in order to disable the Puppet
reporting during the deployment. It some cases it
Puppet was failing the deploymnet being unable to
store the report file to the missing Puppet master.
Change-Id: I888316824920f71f6c4953c513eea3a4c277d50b
This prevents us from picking up status files from previous run when
current run hasn't written them for some reason, i.e. crash etc.
Change-Id: I83d0b4aa3c42210279b75ed7b575919d2d092ff0
Closes-Bug: #1560026
(cherry picked from commit e5311dd97b)
Use filter for raw_report only with log events (such as what was
changed, were was changed, what was triggered and etc) for noop_run.
Change-Id: I4e0f1d25e8145de46f7ff059956cd086bf2f699c
Related-bug: #1618945
This patch adds ability to run deployment graph with noop option.
In same time, this option will be applied only to 'shell' and
'puppet' types only.
Change-Id: Ibcb275bb84dfd553ab07e6d58af753ecf96ab3a5
Interface of dhcpchecker has been changed so this patch make net_probe
agent work in accordance.
Change-Id: If4fbcb9643b0f45f7e1b76d8ae8f525cef1df298
Related-Bug: #1569325
Without this change Astute send only combined summary: part data
from last_run_summary and part data from last_run_report.
With this change user can setup Astute send detailed report in
summary by setup 'puppet_raw_report' in Astute config.
In this case Astute will also send raw_report field with
full puppet run report.
Change-Id: I52bd709fc3fdd44d5477f75bdb36d063a2754555
Bootloaders may check MBR signature to determine,
if it can boot from thios disk. So let's clear it
together with boot code.
Also #{dev[:name]} is just a name of a device, like
sdb, so add /dev/ path.
Change-Id: Ifc23fe4e4919a10b3d5546c98ee333ccac9c92f2
We are erasing 446 bytes of bootloader code before rebooting
node, but you can write only blocks with O_DIRECT, so let's
write 446 bytes without oflag=direct and do sync after dd
instead.
Change-Id: I7b5f9749b170a9b7191991dd02cb867bba0e4c43
Partial-Bug: #1573105
Closes-Bug: #1538587
We should check not only class of report, but value of
resource statuses.
Also we should not use default pid to allow running other puppet
instances
Related-Bug: #1552805
Closes-Bug: #1566582
Change-Id: I1dd0c25891c8d064e0f3ab1a12ddb14698070c17
Zeroing first 1Mb of a block device will almost always
lead to serios system error, if there is a filesystem
on this block device and this filesystem is mounted.
This code had 2 points: to prevent system from booting
from hard drive after reboot and to prevent anaconda
(or other OS installer) to automatically recognize
disk structure. But since we only use image-based provision
this is not the case anymore.
It's enough to clear first 446 bytes of MBR where the first
stage of a bootloader resides. So we will also be able to
check nodes disks and filesystems after deleting it from
cluster for troubleshooting for example, because partition
scheme will not be touched.
https://wiki.archlinux.org/index.php/Master_Boot_Record
Change-Id: I60f2b250d6d5997b4b471c27ed00d057ae73c30a
Fixes-bug: #1538587
Do not enter error state when other puppet instances are detected by the
time we run puppet apply. Let it be other puppet owner responsibility to
synchronize with our puppet instance.
Change-Id: Id01f16d661c55b0cc82bf3a6eed2050deb5665d1
Closes-Bug: #1552805
5 seconds timeout per URL should be enough to detect probelms with
URL accessibility and avoid MC agent execution timeouts.
Change-Id: Ic0214c8164d0659ee6f5dd73e8e1c438d413c76a
Closes-bug: #1558460
This change adds in the attemped to parsing of the puppet's
last_run_report.yaml as part of the summary task. This will add a list
of resources that were changed or failed to the response from the
puppetd mcollective agent
Change-Id: Iddec06add86cf20f19c3165020d2d6e465f908a2
Related-Blueprint: granular-task-idempotency
netprobe will be started with *collect_timeout* parameter
that is lower than net_probe.rb agent timeout
hung frame listeners will be matched correctly, and cleaned with
termination signal
Change-Id: I7dc2adf6aa1d199e2b8fe58718aad5e56f85b9d1
Partial-Bug: 1466020
Some puppet modules depend on HOME variable
being configured for normal operation.
Change-Id: Iba1a0c6413fc8756d7bd60f6e5a3201d8d120c86
Closes-Bug: #1479763
This change changes the way the erase_node action performs the cleanup
of the disks. We attempt to remount any ext2/3/4 devices as RO and
set the error action to continue. Additionally we are no longer using
sysrq to sync all file systems, reboot all file systems, or sending a
SIGTERM to all processes. Now the disk erase occurs and a sysrq to
reboot the machine after 5 seconds via a forked process. This should
allow for mcollective to send back the response to the fuel node to
acknowledge the erase_node action.
Change-Id: If5ce3d1c2ce99ec422a372bfc30b273583f9fb38
Closes-Bug: 1461074
When mcollective is launched via Upstart, the current implementation
of the filesystem erase code is not being executed as part of the
SIGTERM handler that is called when we attempt to SIGTERM all
processes. This change pulls the majority of the code we use to
erase a system out of a child thread into the main agent action. This
change leaves the reboot in a child process and SIGTERM handler so
that astute will get the response for the erase_node command and will
mark it complete. An added benefit of this change is that the debug
messages are now returned back to astute and show up in the astute.log
where previously they were being silently discared.
Change-Id: Ib9ee7db0a4d872ea5d1485ec036940f12b0d251e
Closes-Bug: 1461074
We create /etc/nailgun-agent/nodiscover during
provisioning and then this file is assumed to be
removed in /etc/rc.local which guarantees
that nailgun-agent doesn't change mcollective config at the
same time when cloud-init does this. Otherwise, we can
end up with corrupted mcollective config.
Former location of this file /var/run/nodiscover assumes
it is removed at the beginning of the boot process while
we need it to be in place at least until cloud-init
has finished its magic. For details see
http://www.pathname.com/fhs/pub/fhs-2.3.html#VARRUNRUNTIMEVARIABLEDATA
Related-Patch: If8d1252e6d351ad073de26afc13a19de76f531fb
Change-Id: I5fca4ca39abdc273f6958f2643fae6c5c99fba68
Related-Bug: #1449186
Repo availability with and without setup will return
response in next format:
{uid=> '3', status=> 1, out=>{failed_urls=>[...]}, err=>"Error message"}
Partial-Bug: 1439686
Change-Id: I3216b97df5e7b8974ac7155d06446c4419d293a1
We use 'hook' role because we do not need to calculate
multirole progress. Also for provision we do need role
at all. But here we use DeploymentProxyReporter and
need role.
Fix node type detection: 'target\n' or 'target' should
be detected as 'target'
Change-Id: Ibb87bf4a0b0abdf5ad0d703bb40cc55ae8ce9104
Closes-Bug: #1455824
Closes-Bug: #1455883
Co-Authored-By: Vladimir Kozhukalov <vkozhukalov@mirantis.com>
Co-Authored-By: Łukasz Oleś <loles@mirantis.com>
Add check_url_retrieval action to net_probe.rb. It uses urlaccesscheck
from network checker to retrieve urls passed as parameter.
Add check_repositories method to dispatcher. It uses above action via
orchestrator to test given urls.
Partial-Bug: #1439686
Depends-On: Idc04f74ad7364dee452e9151391654f828e2342d
Change-Id: Ifb28bd0a53abf07e48d41683d10f90546889b0e4