[#764] -- waagent -configuration-path:/path -start not take effect
[#761] -- MetadataProtocol has no client object
[#757] -- deprovision is executed even if input 'n'
[#754] -- /etc/resolv.conf is removed if create a VM base on an specialized image
[#746] -- Agent WALinuxAgent-2.2.12 is blacklisted - skipping download
[#740] -- Duplicate logging on RHEL/CentOS
Signed-off-by: Brendan Dixon <brendandixon@me.com>
* Make sure the initial device is a valid disc, and fallback if not
This is the same check the fallback code uses, and is necessary as on
later FreeBSD 11 versions the disc are retruned in reverse order. Thus
the original function returns 'pass1' instead of 'da1' which fails. This
fixes the issue and allows the resource disc to be mounted again, though
relying on the fallback is not the cleanest solution.
* Skip 'pass' devices when looking for the resource disk
This fixes the error introduced in FreeBSD 11 where the order of
outout from camcontrol changed from da1,pass1 to pass1,da1 and thus
waagent misidentified the disc as 'pass1'. Instead of taking the
first device, we now split the string at ',' and return the first
device which does not begin 'pass'.
* Add initial support for the OpenBSD operating system
There are some differences between FreeBSD, OpenBSD, and Linux.
Notes:
- OpenBSD ships LibreSSL, but WALinuxAgent needs OpenSSL for CMS, so
use the openssl port and the "eopenssl" binary instead.
- Don't run the custom DHCP client but parse /var/db/dhclient.leases.hvn0.
OpenBSD's lease file uses a modified syntax.
- OpenBSD does not have /proc. WALinuxAgent should never assume that
the /proc filesystem is available.
- OpenBSD does not have sudo, but its replacement doas. The OpenBSD
class implements support for modifying the doas.conf file.
- Unlike FreeBSD, OpenBSD supports and mounts UDF DVDs just fine.
- Create a swap partition instead of a swap file on the resource disk.
- Many other minor changes for OpenBSD
TODO:
- The /proc checks needs to be replaced with pgrep/ps etc. checks for
OpenBSD. For now it just checks if /proc is available or returns
without error.
Make sure to install waagent with --register-service as setuptools
will not set the permissions of /etc/rc.d/waagent correctly (the file
has to be executable to be used by OpenBSD's rc system).
* Remove debug statement that was use to fix mount_dvd on OpenBSD.
* I accidentally replaced the FreeBSD resource disk handler.
The OpenBSD disk handler is an addition, not a replacement.
Found by jonathangray
* pylint
pylint found one bug in setting the password; other changes are just
for the style.
* strip newline from generated password hash.
Issue reported by Lili Deng.
* Keep AutoUpdate enabled, it was disabled for initial porting.
Pointed out by @hglkrijger
* Use a wildcard and delete all DHCP lease files on *BSD.
Requested by @hglkrijger
* Check mount output to detect already mounted resource disk (#600)
mount(8) returns '32' in a variety of cases, we need to check the output
to be sure the resource disk is already mounted.
* Pass '-n' to sfdisk when not writing
Some old versions of sfdisk(8) will open block device in O_RDWR mode regardless
of the face that we're actually just querying partition type and not changing
it and if device is opened in this mode it will trigger partition rescan when
it is closed. This creates a race as partitions (/dev/sd*) will be going away
and re-appear later. Specify '-n' to indicate no write is required, sfdisk(8)
always opens the device in O_RDONLY now.
* Re-read partition table after changing partition type
Some old sfdisk(8) versions don't do syncronious partition re-read after
making changes. The kernel will re-read it anyway in background but this
will cause races with further mkfs as partition devices will be
disappearing. Do explicit partition rescan after we change partition id.
With recent versions of sfdisk the -c command is deprecated and
--part-type is recommended to be used instead. This use also requires
the output to be stripped instead of rstripped due to a leading space.
FreeBSD VM gets a UUID from host which informs where resource
disk locates. But that UUID string was not exposed from VM kernel,
as a result, the agent used a hard code "2:1:0" as the location of
resource disk. That should be updated after FreeBSD VM kernel
exposed UUID through "sysctl dev.storvsc" command.
But considering compatible with previous FreeBSD VM, the hard code
logic cannot be removed, and they are left there as a fallback.
* add testing for mountpoint, some refactoring
* fixed double space in mount string
* patch for ConfigProvider
* revert patch to original string.
* update documentation, add 'n' option for mountopts
* remove test argument
* More descriptive description in README, n to None
* minor var name changes for clarity
* spacing, missing self in get_mount_string
* mount_opts to mount_options
* add config option to writtet WaagentConf, minor style changes.
* mount options fix, is not Note
* add self to get_mount_string args
* self to function, not where it's called
* mount_options = output of function, not the function.
* get_mount_string returns with mount options/if not none
* forgot to remove part of the string
* instantiate resource disk handler, get_switch to get in conf.py
* Added config option to waagent.conf
* minor style fixes
* mountOpts is None change, and also added removed variable.
* revert changes to bin/waagent2.0
* reverted waagent2.0 to e8c641f
* config options added
* - Integrate RDMA handling
* - RDMA Integration
+ Fix syntax errors
+ Use the full distro name to differentiate properly between openSUSE
(which has currently no RDMA driver build) and SLES
* - RDMA integration
+ Do not stop the execution of the agent work flow by throwing an
exception if the RDMA handler is not specialized. Simply log an error
to indicate that the handler is not supported although it has been
configured with OS.EnableRDMA=y. The configuration in this case is in
error.
* - RDMA integration
+ Document he new OS.EnableRDMA configuration setting
The Agent will monitor for more recent versions and update itself
(without impacting the installed version). If the new Agent fails
(in a very bad way or consistently), the code rolls back to the prior
version.
Signed-off-by: Brendan Dixon <brendand@microsoft.com>
- correct scvmm references
- add unit tests for scvmm detection
- ensure all matching devices are mounted and examined for scvmm configuration
- exit once vmm startup script is found and executed
- fixes#185