Commit Graph
61 Commits
Author SHA1 Message Date
Robert Schweikert ab12081fd8 - Install proper version of rdma package (#995)
+ Depending on the order of the found available packages the wrong rdma
    package may be installed. Use the proper variable to identify the
    package version to install
2018-01-10 15:48:20 -08:00
Christopher Boumenot a045411004 Update provision message with cloud-init (or not) (#986) 2018-01-04 12:34:07 -08:00
Christopher Boumenot e0eebb2ff2 review feedback 2017-12-12 12:06:02 -08:00
Christopher Boumenot 43f4de9d1f Emit a GuestState telemetry event after provision 2017-11-28 16:59:10 -08:00
Brendan Dixon 0352a85712 [#897] -- 'Target handler state' wall of errors
[#896] -- End of Line Comments are Not Supported nor Handled
[#891] -- Create a Telemetry Event to Track Custom Data Execution
[#884] -- Cleanup Old Goal State and Extension Cache
[#876] -- The agent should use a scaling back-off when retrying HTTP requests
[#869] -- The agent should report OS information in the correct JSON format.

Updated version to 2.2.18.1
Replaced errno.EREMOTEIO with fixed value (since the constant is not present in all Python 2.7 versions)

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-18 14:57:16 -07:00
Brendan Dixon e85d5327a4 [#908] -- Set Files to 0400 in /var/lib/waagent
[#906] -- Hardcoded value for sshd's ClientAliveInterval (180)
[#899] -- Improve HeartBeat Event
[#898] -- Send dummy status if extension fails to write a #.status file

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-10-17 09:18:46 -07:00
Douglas Jordan 8f04cfe1f9 Updating max_retry to match 2017-10-12 23:08:52 +00:00
Ubuntu fad348120c Changing host key sleep to 1 second as we are only querying if a file exists. Could be even less. 2017-10-12 23:00:30 +00:00
Robert Schweikert 8450757ec4 - SUSE rdma
+ Simplify the check for rdma package installed, we only support
    RDMA on distros where startswith is available
2017-09-15 09:08:02 -04:00
Robert Schweikert 7b9c2b0c73 - RDMA load fixes for SUSE
+ Fix comparison issue that causes the installed RDMA package to not
    be detected. Tris triggers a re-install of the package which in turn
    triggers a reboot. Thus we end up in a endless reboot loop.
2017-09-08 14:49:55 -04:00
Brendan Dixon 03beb77fb9 [#850] -- Cannot get to state 'Running' with Provisioning.Enabled=n
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-22 10:24:55 -07:00
Brendan Dixon 285aeff238 [#783] -- The agent fails to use the standard Linux environment variables for HTTP proxy
[#830] -- Ensure VM identifier is properly ordered

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-08-15 10:21:52 -07:00
brendandixon 53ca96622b Merge pull request #836 from longlimsft/ubuntu_p10
Support RDMA on Ubuntu
2017-08-10 15:15:39 -07:00
Long Li 70c13c381b Read OS.UpdateRdmaDriver from config file
OS.UpdateRdmaDriver is already defined earlier. This value tells WALA if it will do automatic kernel update for Ubuntu.
2017-08-04 22:08:05 +00:00
Long Li 9051d18a4e Add Ubuntu support to RDMA factory 2017-08-04 22:08:05 +00:00
Long Li 92ea4ff47f Add Ubuntu RDMA support for driver update and reconfiguration
Ubuntu packages multiple versions of RDMA driver in the kernel. This adds support for resolving the correct driver based on the host ND version, and to update kernel if none is found.
2017-08-04 22:07:58 +00:00
Robert Schweikert 362a2386d9 - Fix RDMA driver loading when online repo is not available (#815)
+ When the online repo is not available zypper could hang on waiting for
    user confirmation about skipping the repo, we also tried to refresh
    the repo again after we already knew it was not available.
  + Code generated an error on zypper return code 106, which only indicates
    that repos were skipped but does not mean package install failed.
2017-07-27 09:48:28 -07:00
brendandixon 043e71d7a5 Merge pull request #786 from reyk/waagent-ssh-keygen-A
Add Provisioning.SshHostKeyPairType=auto to support ssh-keygen -A
2017-07-06 14:05:41 -07:00
Brendan Dixon 8530016e71 Make version recognition more flexible
Report pre-provisioned VMs as ready
Reworked optional agent support

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-06-29 16:01:25 -07:00
Reyk Floeter ed5bb3301e Add Provisioning.SshHostKeyPairType=auto to support ssh-keygen -A
The supported values are now "rsa", "dsa", "ecdsa", "ed25519", or
"auto".  "auto" generates all supported host key types in the correct
directory by calling "ssh-keygen -A" (supported since OpenSSH 5.9 in
2011).  The code uses RSA for the thumbprint because only a single one
is supported by the agent and the Azure protocol.
2017-06-23 15:54:04 +02:00
Brendan Dixon 92dd1c3118 [#777] -- Deprovisioning when VM identifier changes is too aggressive
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-06-21 16:11:34 -07:00
Brendan Dixon eb3662e0e1 [#769] -- HostGAPlugin requests should never go through proxy
[#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>
2017-06-21 13:41:05 -07:00
Reyk Floeter aad62676a7 Add initial support for the OpenBSD operating system (#712)
* 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
2017-05-30 15:27:22 -07:00
Brendan Dixon 90cf4f680f [#711] -- There are too many log print to /var/log/waagent.log
[#714] -- Questionable split call in common/conf.py
[#717] -- Remove extension logs during deprovision
[#720] -- Reset of RDMA drivers not taking effect
[#724] -- Location of configuration file should be editable issue

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-23 15:45:33 -07:00
Brendan Dixon 8c7eaf9007 [#721] -- WALA deprovision process not clean up all cloudinit files
[#725] -- v2.2.11 can throw unexpected exceptions on provisioned VMs
[#727] -- v2.2.11 cannot update status for RDFE VMs

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-23 11:23:05 -07:00
Hans Krijger 4bb0443f06 Provision fix (#709)
* fix call to is_provisioned

* fix typo
2017-05-10 21:34:51 -07:00
Brendan Dixon f8916bc43a Emit event if reprovisioning without a deprovision (#706)
Correct enabling test agents
Blacklist agent due to any failure

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-10 12:32:59 -07:00
brendandixon 5c90636dd8 Added Provisioning telemetry duration (#702)
Correctly handle cleaning directories that include symlinks
Reduced polling interval #701
Enable selective agent testing
Improved FIPS configuration variable name
Reduced cloud-init files removed on deprovision #631

Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-08 16:27:56 -07:00
Brendan Dixon c115a7a410 Deprovision cloud-init data (#631)
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-03 16:15:10 -07:00
Brendan Dixon cbc2f4f366 Addressed issues #687, #604, and #531
Signed-off-by: Brendan Dixon <brendandixon@me.com>
2017-05-02 13:28:19 -07:00
Hans Krijger d7d41284e1 Provisioning logging improvements (#673)
* log the device list when finding dvd

* improve logging for get_dvd_device

* improve logging for mount_dvd

* more granular logging for copy_ovf_env

* provisioning logging and error cleanup

* ubuntu provisioning logging cleanup

* improve Ubuntu provisioning logging

* ubuntu provision cleanup

* debugging for cloud-init

* add validation method and logging for cloud-init

* error cleanup, fix mount

* minor cleanup

* add validate cloud-init logging

* unit test fixes
2017-04-18 14:35:11 -07:00
Hans Krijger 9ca715cfb0 Override decode custom data (#674)
* update agent to 2.2.9

* override decode custom data when execute enabled
2017-04-18 12:34:33 -07:00
enihcam ab90f075d1 Add Arch distro support (#670)
* Add Arch distro support

* Added archDistro in waagent2.0

* Added missing dependency for archDistro

* Revert "Added missing dependency for archDistro"

This reverts commit 259cc020c42ec575dbe11c3057002d03e90353a4.

* Revert "Added archDistro in waagent2.0"

This reverts commit dc51cdfcb392b3958e0bcb60b3144226f07d3723.

* Enable waagent AutoUpdate for archlinux.
2017-04-18 12:02:01 -07:00
Hans Krijger e85bebadc6 do not log keygen errors in ubuntu since we retry (#666) 2017-04-12 13:54:25 -07:00
Hans Krijger 8b463d749e fix the rdma package pattern match (#648) 2017-04-04 11:32:33 -07:00
Stephen A. Zarkos 3ce1e3fdde Improve RDMA package version matching (#634)
* Fix RDMA package version matching

The pattern matching for the RPM naming is too strict:
- We actually have a 4.1.3.2 bugfix release now, but pattern only allows
3-digit naming
- We may have multi-digit version numbers in the future

* Fix RDMA update regex as well
2017-03-31 11:20:24 -07:00
Hans Krijger 67d1784f6e retry get thumbprint if key is deleted (#603) 2017-03-06 10:51:42 -08:00
Long Li 9b7079be76 Fix a reboot issue when updating RDMA driver on ND host update (#594)
* Return failure if module is already loaded at the time of probe

* Return failure when module is not present in lsmod

* CentOS: Reboot the system when newly installed RDMA module fails to probe or load

* SUSE: Reboot the system when newly installed RDMA module fails to probe or load
2017-03-06 10:51:11 -08:00
Hans Krijger d18d34cdd5 CentOS 7.0 hostnamectl fix (#573)
* cleanup and reformat file; fallback to hostname when hostnamectl fails; logging cleanup

* cleanup
2017-01-25 17:33:06 -08:00
Hans Krijger 9ea18d8658 Add telemetry event for host plugin usage (#560)
* reformat file

* add host plugin event; minor cleanup

* clean up imports
2017-01-18 18:50:01 -08:00
Hans Krijger 6b79ddda5c support NetworkManager leases (#543) 2017-01-11 10:20:57 -08:00
Robert Schweikert cc84497511 - Handle interrupt signal (#524)
+ Proper number of arguments for handler, fixes #521
  + Do not interrupt once we are running to avoid leaving the system in an
    indeterminate state, fixes #515
2017-01-04 10:30:45 -08:00
Douglas Jordan 0c86110b7c Remove unnecessary sleep and increase poll rate (#477)
* Remove unnecessary sleep and increase poll rate

* Adds tests for iWorkflow and BIG-IQ

This patch adds remaining tests for iWorkflow and BIG-IQ platforms

* Modifying code to prevent throttling.
2016-11-30 11:38:25 -08:00
Yoon Hong c451b3378d Handle ctrl-c during waagent -deprovision (#471) (#484) 2016-11-18 15:58:41 -08:00
William Douglas d4a3226142 Add Clear Linux distro support 2016-10-26 21:12:05 +00:00
Yoon Hong 93d9105cf4 Merge pull request #437 from jinhyunr/remove_shell
Replace unnecessary shell out logics with python based ones (#232)
2016-09-19 20:54:50 -04:00
Yoon Hong 5576dea216 Replace unnecessary shell out logics with python based ones (#232) 2016-09-16 20:02:43 -04:00
Hans Krijger 4539b6eaaa remove code which disables selinux 2016-09-14 16:41:05 -07:00
Hans Krijger 113a32c48b wite provisioned file and report ready even when provisioning is disabled 2016-09-08 13:04:53 -07:00
Hans Krijger 6ee62e846b pep8 reformat 2016-09-08 13:04:53 -07:00