diff options
author | Tim Smith <tsmith@chef.io> | 2020-07-29 11:16:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 11:16:02 -0700 |
commit | 6c6f02f5599e97756f913039dec5602ce4e35095 (patch) | |
tree | 5e9cbd880a8af279e749101193a56eb4ef211c86 | |
parent | 1138f928920b08857823c1b37206cf359005b71f (diff) | |
parent | aea681173ed4f8d00b187ca33d933212b273ef38 (diff) | |
download | chef-6c6f02f5599e97756f913039dec5602ce4e35095.tar.gz |
Merge branch 'master' into nkierpiec/add-dobi
-rw-r--r-- | CHANGELOG.md | 29 | ||||
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | Gemfile.lock | 26 | ||||
-rw-r--r-- | RELEASE_NOTES.md | 8 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | chef-bin/lib/chef-bin/version.rb | 2 | ||||
-rw-r--r-- | chef-config/lib/chef-config/version.rb | 2 | ||||
-rw-r--r-- | chef-utils/lib/chef-utils/version.rb | 2 | ||||
-rw-r--r-- | cspell.json | 243 | ||||
-rw-r--r-- | lib/chef/http.rb | 22 | ||||
-rw-r--r-- | lib/chef/http/authenticator.rb | 2 | ||||
-rw-r--r-- | lib/chef/resource/windows_feature_powershell.rb | 6 | ||||
-rw-r--r-- | lib/chef/server_api_versions.rb | 4 | ||||
-rw-r--r-- | lib/chef/version.rb | 2 | ||||
-rw-r--r-- | omnibus/Gemfile.lock | 8 | ||||
-rw-r--r-- | omnibus_overrides.rb | 4 | ||||
-rw-r--r-- | spec/unit/server_api_spec.rb | 31 |
17 files changed, 92 insertions, 303 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 924b0c9e1e..33ef0b7941 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,23 +1,23 @@ <!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ --> -<!-- latest_release 16.3.43 --> -## [v16.3.43](https://github.com/chef/chef/tree/v16.3.43) (2020-07-28) - -#### Merged Pull Requests -- Fix NoMethodError when server returns a 406. [#10216](https://github.com/chef/chef/pull/10216) ([phiggins](https://github.com/phiggins)) +<!-- latest_release --> <!-- latest_release --> -<!-- release_rollup since=16.3.38 --> -### Changes not yet released to stable - -#### Merged Pull Requests -- Fix NoMethodError when server returns a 406. [#10216](https://github.com/chef/chef/pull/10216) ([phiggins](https://github.com/phiggins)) <!-- 16.3.43 --> -- Define local test variables to avoid test load order bug. [#10214](https://github.com/chef/chef/pull/10214) ([phiggins](https://github.com/phiggins)) <!-- 16.3.42 --> -- Use powershell_out vs. powershell_script in hostname [#10147](https://github.com/chef/chef/pull/10147) ([tas50](https://github.com/tas50)) <!-- 16.3.41 --> -- Mark a private method as private with yard [#10212](https://github.com/chef/chef/pull/10212) ([tas50](https://github.com/tas50)) <!-- 16.3.40 --> -- Bump deps to current [#10210](https://github.com/chef/chef/pull/10210) ([tas50](https://github.com/tas50)) <!-- 16.3.39 --> +<!-- release_rollup --> <!-- release_rollup --> <!-- latest_stable_release --> +## [v16.3.45](https://github.com/chef/chef/tree/v16.3.45) (2020-07-29) + +#### Merged Pull Requests +- Bump deps to current [#10210](https://github.com/chef/chef/pull/10210) ([tas50](https://github.com/tas50)) +- Mark a private method as private with yard [#10212](https://github.com/chef/chef/pull/10212) ([tas50](https://github.com/tas50)) +- Use powershell_out vs. powershell_script in hostname [#10147](https://github.com/chef/chef/pull/10147) ([tas50](https://github.com/tas50)) +- Define local test variables to avoid test load order bug. [#10214](https://github.com/chef/chef/pull/10214) ([phiggins](https://github.com/phiggins)) +- Fix NoMethodError when server returns a 406. [#10216](https://github.com/chef/chef/pull/10216) ([phiggins](https://github.com/phiggins)) +- Fix protocol negotiation for unversioned objects [#10218](https://github.com/chef/chef/pull/10218) ([lamont-granquist](https://github.com/lamont-granquist)) +- Update libarchive, liblzma, and nokogiri to the latest [#10221](https://github.com/chef/chef/pull/10221) ([tas50](https://github.com/tas50)) +<!-- latest_stable_release --> + ## [v16.3.38](https://github.com/chef/chef/tree/v16.3.38) (2020-07-27) #### Merged Pull Requests @@ -91,7 +91,6 @@ - Remove bad filter from git spec tests [#10204](https://github.com/chef/chef/pull/10204) ([lamont-granquist](https://github.com/lamont-granquist)) - fix el6 selinux [#10206](https://github.com/chef/chef/pull/10206) ([lamont-granquist](https://github.com/lamont-granquist)) - Remove some test cruft around diffing [#10205](https://github.com/chef/chef/pull/10205) ([phiggins](https://github.com/phiggins)) -<!-- latest_stable_release --> ## [v16.2.73](https://github.com/chef/chef/tree/v16.2.73) (2020-07-01) diff --git a/Dockerfile b/Dockerfile index 4312b9d94e..5d2610093d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ FROM busybox LABEL maintainer="Chef Software, Inc. <docker@chef.io>" ARG CHANNEL=stable -ARG VERSION=16.3.38 +ARG VERSION=16.3.45 RUN wget "http://packages.chef.io/files/${CHANNEL}/chef/${VERSION}/el/6/chef-${VERSION}-1.el6.x86_64.rpm" -O /tmp/chef-client.rpm && \ rpm2cpio /tmp/chef-client.rpm | cpio -idmv && \ diff --git a/Gemfile.lock b/Gemfile.lock index a676c53eed..e505ef5b65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,10 +8,10 @@ GIT GIT remote: https://github.com/chef/ohai.git - revision: 5a1bce1ca8bf3310f14632c28ed0f0e9b04ec2f9 + revision: 955a4a5685026f28d417d8977784a6ca89ff0279 branch: master specs: - ohai (16.3.1) + ohai (16.3.2) chef-config (>= 12.8, < 17) chef-utils (>= 16.0, < 17) ffi (~> 1.9) @@ -28,12 +28,12 @@ GIT PATH remote: . specs: - chef (16.3.43) + chef (16.3.45) addressable bcrypt_pbkdf (= 1.1.0.rc1) bundler (>= 1.10) - chef-config (= 16.3.43) - chef-utils (= 16.3.43) + chef-config (= 16.3.45) + chef-utils (= 16.3.45) chef-vault chef-zero (>= 14.0.11) diff-lcs (>= 1.2.4, < 1.4.0) @@ -63,12 +63,12 @@ PATH tty-prompt (~> 0.21) tty-screen (~> 0.6) uuidtools (~> 2.1.5) - chef (16.3.43-universal-mingw32) + chef (16.3.45-universal-mingw32) addressable bcrypt_pbkdf (= 1.1.0.rc1) bundler (>= 1.10) - chef-config (= 16.3.43) - chef-utils (= 16.3.43) + chef-config (= 16.3.45) + chef-utils (= 16.3.45) chef-vault chef-zero (>= 14.0.11) diff-lcs (>= 1.2.4, < 1.4.0) @@ -114,15 +114,15 @@ PATH PATH remote: chef-bin specs: - chef-bin (16.3.43) - chef (= 16.3.43) + chef-bin (16.3.45) + chef (= 16.3.45) PATH remote: chef-config specs: - chef-config (16.3.43) + chef-config (16.3.45) addressable - chef-utils (= 16.3.43) + chef-utils (= 16.3.45) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) @@ -131,7 +131,7 @@ PATH PATH remote: chef-utils specs: - chef-utils (16.3.43) + chef-utils (16.3.45) GEM remote: https://rubygems.org/ diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1c517f72c6..4de2c94b09 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,12 @@ This file holds "in progress" release notes for the current release under development and is intended for consumption by the Chef Documentation team. Please see <https://docs.chef.io/release_notes/> for the official Chef release notes. -# What's New in 16.3 +# What's New in 16.3.45 + +- Resolved failures negotiating protocol versions with the Chef Infra Server. +- Improved log output on Windows systems in the `hostname` resource. +- Added support to the `archive_file` resource for `pzstd` compressed files. + +# What's New in 16.3.38 ## Renamed Client Configuration Options @@ -1 +1 @@ -16.3.43
\ No newline at end of file +16.3.45
\ No newline at end of file diff --git a/chef-bin/lib/chef-bin/version.rb b/chef-bin/lib/chef-bin/version.rb index 1ba12c48ad..0a02908de0 100644 --- a/chef-bin/lib/chef-bin/version.rb +++ b/chef-bin/lib/chef-bin/version.rb @@ -21,7 +21,7 @@ module ChefBin CHEFBIN_ROOT = File.expand_path("..", __dir__) - VERSION = "16.3.43".freeze + VERSION = "16.3.45".freeze end # diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb index 66c87eef11..831f12cb99 100644 --- a/chef-config/lib/chef-config/version.rb +++ b/chef-config/lib/chef-config/version.rb @@ -15,5 +15,5 @@ module ChefConfig CHEFCONFIG_ROOT = File.expand_path("..", __dir__) - VERSION = "16.3.43".freeze + VERSION = "16.3.45".freeze end diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb index b036307e20..7ed76832e4 100644 --- a/chef-utils/lib/chef-utils/version.rb +++ b/chef-utils/lib/chef-utils/version.rb @@ -15,5 +15,5 @@ module ChefUtils CHEFUTILS_ROOT = File.expand_path("..", __dir__) - VERSION = "16.3.43".freeze + VERSION = "16.3.45".freeze end diff --git a/cspell.json b/cspell.json index cdd7572d88..a53c1ee896 100644 --- a/cspell.json +++ b/cspell.json @@ -492,7 +492,6 @@ "FAILCRITICALERRORS", "failovermethod", "fakeweb", - "fallocate", "falsey", "FAPI", "fastestmirror", @@ -530,17 +529,13 @@ "flushcache", "fmri", "fname", - "fnmatch", "fonttbl", "foobarbam", - "foodcritic", - "Foodcritic", "foorb", "FORCEMINIMIZE", "FORCEOFFFEEDBACK", "FORCEONFEEDBACK", "forwardable", - "Forwardable", "forwardslashes", "fqdns", "FSCTL", @@ -556,13 +551,7 @@ "fzipi", "gaffneyc", "gecos", - "gemdir", "gemdirs", - "Gemfile", - "gempath", - "gemrc", - "gemset", - "gemspecs", "gencaches", "getaddrinfo", "getbinaryfile", @@ -598,26 +587,16 @@ "gmake", "gmetric", "gname", - "gnutar", "googlechrome", "GOTOU", "gotoyuzo", "gpasswd", "gpgautoimportkeys", - "gpgcheck", - "gpgkey", - "Graeme", - "Granquist", "Graty", "Groh", - "groupadd", - "groupdel", "groupmembership", - "groupmod", "groupname", "gsingla", - "gssapi", - "gsub", "gzipped", "habicat", "HACCEL", @@ -626,7 +605,6 @@ "HANGEUL", "Hankins", "Hansson", - "Happycoil", "hardstatus", "HARDWAREPROFILECHANGE", "Haselwanter", @@ -644,11 +622,6 @@ "hdiutil", "HDROP", "HDWP", - "Hedgpeth", - "Heen", - "Heinemeier", - "Heinen", - "Hellmann", "HENHMETAFILE", "hexdigest", "hexencode", @@ -664,7 +637,6 @@ "Hinderliter", "HINSTANCE", "hintname", - "hipchat", "hivename", "HIWORD", "HKCC", @@ -707,13 +679,8 @@ "HWINSTA", "HWND", "HWNDS", - "HWRP", - "HWRPs", "hyperv", - "icacls", "ichannel", - "icmp", - "ICMP", "iconlocation", "idempotence", "idempotency", @@ -721,9 +688,6 @@ "idmv", "IEND", "iface", - "ifcfg", - "ifconfig", - "Ifconfig", "ifdef", "IGNORECASE", "IHDR", @@ -738,26 +702,15 @@ "Indentable", "indentt", "inet", - "inetd", "infile", - "INFINIBAND", "INFLOOP", - "infocmp", "ingobecker", - "inheritence", "iniparse", - "initctl", - "initd", - "initgroups", - "initramfs", "inno", - "inode", "inout", "inpipe", "INPORT", "inputformat", - "inspec", - "Inspec", "insserv", "installable", "INSTALLDIR", @@ -797,7 +750,6 @@ "iterencode", "ivar", "ivars", - "Jablonskis", "Jagdale", "Jagtap", "jailmode", @@ -805,31 +757,19 @@ "janky", "jasonwbarnett", "javatooling", - "Javorski", - "jaymzh", - "jazaval", - "jboss", "jdoe", "Jeppe", "jeremyhage", "jeroenj", "Jesai", "jimwise", - "jjustice", - "jkeiser", "JOHAB", "josephmilla", "joyent", "jsvana", - "jtimberman", "Juanje", "jugatsu", "julienhuon", - "junit", - "jwhois", - "Kampmeier", - "Kantrowitz", - "Kapil", "katello", "Kauppila", "kaustubh", @@ -838,7 +778,6 @@ "keepalive", "keepalives", "keeppackages", - "Keiser", "kenmacleod", "kerberos", "keyfile", @@ -851,8 +790,6 @@ "keystore", "keytab", "keyurl", - "Khatri", - "Kirill", "kitforbes", "klass", "kool", @@ -871,7 +808,6 @@ "LASTEXITCODE", "launchctl", "launchctrl", - "launchd", "Lavey", "lchmod", "lchown", @@ -903,7 +839,6 @@ "libyaml", "lifecycle", "lifecycles", - "linode", "linuxmint", "LISTBOX", "listprop", @@ -964,8 +899,6 @@ "LRESULT", "lsfs", "lslpp", - "lsof", - "lspci", "lssrc", "lstat", "lsuser", @@ -973,19 +906,14 @@ "lucene", "luid", "LUIDS", - "lwrp", - "LWRPs", "lytao", "lzma", "MACCP", "machinename", - "macos", "macports", "macterm", "Madsen", "magick", - "Magnus", - "Maier", "mailservers", "mailslot", "MAILSLOT", @@ -994,15 +922,8 @@ "Mainmodule", "makecache", "makedepend", - "Makefiles", "MAKELONG", "MAKEWORD", - "malloc", - "Mandi", - "mandriva", - "mangeia", - "Mangeia", - "Manjaro", "manpages", "Manyanza", "margs", @@ -1017,8 +938,6 @@ "MAXDWORD", "mbrtowc", "mbtowc", - "mdadm", - "Mdadm", "MDICHILD", "MEDIUMBUSINESS", "megamorf", @@ -1026,8 +945,6 @@ "memlock", "memoizes", "memoizing", - "merb", - "Merb", "merlinjim", "MESSAGEDEST", "MESSAGENAME", @@ -1055,7 +972,6 @@ "mkdir", "mkgroup", "mkmf", - "mkswap", "mktemp", "MKTEMP", "mktmpdir", @@ -1063,7 +979,6 @@ "mntfs", "mobileconfig", "modname", - "modprobe", "MODULETYPE", "Mollison", "Monkeypatches", @@ -1101,7 +1016,6 @@ "multithreaded", "Multiuser", "multivalue", - "Mundrawala", "munge", "Murawski", "Mutators", @@ -1134,12 +1048,7 @@ "nagios", "nameservers", "namespacing", - "nano", - "Nano", - "Nathen", - "nathwill", "NCRC", - "ncurses", "Nehate", "Nejsum", "NERR", @@ -1150,11 +1059,9 @@ "NETBINDDISABLE", "NETBINDENABLE", "NETBINDREMOVE", - "netbsd", "NETCARD", "netdom", "NETLOGON", - "netmask", "netmsg", "NETNAME", "NETPATH", @@ -1168,8 +1075,6 @@ "newval", "Nexenta", "nexentacore", - "Nichol", - "Nikhil", "nillable", "Nimisha", "nlist", @@ -1196,8 +1101,6 @@ "NOGPFAULTERRORBOX", "nogpgcheck", "nokeys", - "nokogiri", - "Nokogiri", "NOLICPROMPT", "nologo", "NOLOGON", @@ -1227,14 +1130,9 @@ "NPAS", "nproc", "nread", - "nscd", - "nsis", - "ntpd", "NTSTATUS", - "Nullsoft", "nupkg", "nyan", - "O'Meara", "objfs", "objs", "OEMCP", @@ -1245,8 +1143,6 @@ "OLDLOGLOCATION", "oldpackage", "oldval", - "omnios", - "Omnitruck", "omry", "onboot", "Onddo", @@ -1256,20 +1152,7 @@ "onparent", "ONPARENT", "onstart", - "openbsd", - "openid", - "openindiana", - "opensolaris", - "openssh", - "openssl", - "openstack", - "Openstack", - "opensuse", - "opensuseleap", - "openvpn", - "openvz", "OPLOCK", - "opscode", "OPTARG", "OPTIND", "optstr", @@ -1296,8 +1179,6 @@ "parms", "passstr", "passw", - "passwd", - "Passwd", "passwordage", "passwordless", "PASSWORDNAME", @@ -1305,7 +1186,6 @@ "pathed", "PATHFINDING", "pathnames", - "paulmooring", "pbkdf", "PBOOL", "PBOOLEAN", @@ -1336,7 +1216,6 @@ "pixdrift", "Piyush", "PKCS", - "pkgadd", "pkgin", "pkginfo", "pkginfos", @@ -1454,15 +1333,7 @@ "questionmark", "quickconfig", "qword", - "Raghavan", - "Rakefile", - "rakelib", - "Rakvåg", - "ramereth", - "Ranjib", - "raspbian", "rassoc", - "RBAC", "rbag", "rbconfig", "rbenv", @@ -1534,13 +1405,9 @@ "restorecon", "resumehandle", "retriable", - "REXML", "rhash", - "rhel", - "RHEL", "rhosts", "rhscl", - "rhsm", "rindex", "rjust", "rmatch", @@ -1549,10 +1416,7 @@ "RMODE", "rmtree", "rname", - "Robb", "robuye", - "Rockwood", - "Romain", "roundrobin", "rpartition", "rpmdb", @@ -1563,27 +1427,12 @@ "rquery", "rsakey", "RSAT", - "rspec", - "rstrip", - "rsync", "rsyslog", "rtprio", - "rubocop", - "rubygem", - "Rubygems", "rubyinstaller", - "RUBYLIB", - "RUBYOPT", - "rubyzip", - "Rubyzip", - "Rudikza", "runas", - "rundeck", "RUNFULLSCREEN", "runid", - "runlevel", - "runlevels", - "runlist", "runlock", "runpid", "runrun", @@ -1594,28 +1443,19 @@ "rxvlan", "sacl", "safematix", - "Salim", - "salzig", "samus", - "Sauve", "savetime", "sawanoboly", "SAWANOBORI", - "Saxby", "sbin", "Sbzl", - "Scaleway", - "schtask", "schtasks", - "Schuberg", "SCODE", "scopeid", "screenrc", "Scriptable", "SCROLLBAR", "SCROLLBARS", - "scutil", - "secedit", "secoption", "secopts", "secp", @@ -1624,10 +1464,8 @@ "secvalue", "SEGDPL", "SEGLIM", - "selinux", "selinuxenabled", "SEPCHARS", - "Serdar", "SERENUM", "serializable", "Sertelon", @@ -1651,11 +1489,6 @@ "SETTINGCHANGE", "setuid", "SETX", - "sfiggins", - "sftp", - "Shamrell", - "Sharad", - "sharefs", "SHARENAME", "SHAs", "shellcmd", @@ -1686,9 +1519,6 @@ "sidorenko", "Sierles", "sigar", - "SIGHUP", - "SIGINT", - "SIGKILL", "signedheaderauth", "signoff", "SIGQUIT", @@ -1703,34 +1533,15 @@ "skipkeys", "skippyj", "skus", - "slapadd", - "slapd", - "sles", - "SLES", "Sliim", "SMALLBUSINESS", "SMARTCARD", "SMARTCARDROOT", - "smartos", - "smbfs", "smbshare", "Smokish", "SMTO", - "smtp", - "snapctl", - "snapd", - "Snapp", - "snmp", - "socketless", - "Socketless", - "softlayer", - "Softlayer", - "softwareupdate", - "Solaris", "SOLOEXEC", - "Solr", "solv", - "Sölvi", "somedir", "somefile", "someotherfile", @@ -1739,8 +1550,6 @@ "sparc", "spawninstance", "specdoc", - "Splunk", - "sprintf", "srand", "SRCCHARSET", "SRCCODEPAGE", @@ -1754,8 +1563,6 @@ "sslclientcert", "sslclientkey", "sslverify", - "sspi", - "sssd", "STACKSEG", "stacktraces", "Stanislav", @@ -1802,16 +1609,12 @@ "SUBSTED", "subsytem", "subtrees", - "sudoer", - "sudoers", - "suid", "SUPPRESSMSGBOXES", "Sutay", "svcadm", "svccfg", "svcs", "SWAPERROR", - "swapfile", "swapfiles", "swapoff", "swapon", @@ -1836,9 +1639,6 @@ "syslog", "sysread", "systctl", - "systemctl", - "systemd", - "Systemd", "systemdrive", "SYSTEMDRIVE", "systemrestart", @@ -1889,8 +1689,6 @@ "tmux", "Tollef", "Tolstov", - "tomdoherty", - "Tomlrb", "toolchain", "Toomas", "toplevel", @@ -1904,14 +1702,11 @@ "TRUSTEDDEVICES", "TRUSTEDPEOPLE", "TRUSTEDPUBLISHER", - "tsmith", "TSTDUP", "TSTOVFL", "TTCS", "tuid", "tvfs", - "txqueuelen", - "txvlan", "typecode", "tzdata", "tzutil", @@ -1922,13 +1717,8 @@ "uids", "uint", "UINT", - "ulimit", "ulong", "ULONGLONG", - "umask", - "umount", - "uname", - "unattend", "UNAVAIL", "uncask", "uncategorized", @@ -2010,11 +1800,8 @@ "usri", "ustring", "utime", - "uuid", "uuidgen", "UUIDs", - "uuidtools", - "vagrantup", "Vaidas", "valclient", "Validatorless", @@ -2022,32 +1809,20 @@ "Vargo", "variablevalue", "Vasiliy", - "Vasundhara", - "vbox", - "vboxsf", - "vcenter", - "VCPU", - "Veertu", "vendored", "versio", "versioncompare", "versionlock", "VERYSILENT", "vfstab", - "vgroot", "viewkind", "vincentaubert", "VIOKBD", "Virender", "virt", - "Vitruvius", - "Vitvitskiy", "vkhatri", - "VLAN", "VMBUS", - "vmware", "voidcmd", - "VPNs", "vxfs", "waitfor", "waitpid", @@ -2059,7 +1834,6 @@ "WBITS", "WCHAR", "wchars", - "Webber", "webhook", "WEBHOSTING", "webrick", @@ -2073,8 +1847,6 @@ "whatinstalled", "whatprovides", "whereis", - "whoami", - "whyrun", "WINAPI", "winbase", "windef", @@ -2089,15 +1861,11 @@ "winnt", "WINNT", "winprog", - "winrm", - "Winsor", "WINVER", "WIXUI", "WKSTA", - "wmic", "WMIGUID", "woot", - "wordpress", "workdir", "WPARAM", "wrlinux", @@ -2106,28 +1874,18 @@ "wtime", "xabcz", "Xabier", - "xargs", - "xattr", "XATTR", "xchar", - "Xcode", "xdigit", "XEEDS", - "xenial", "XFORM", - "xinetd", "XMLHTTP", "xproto", "Xtdate", "yieldparam", - "yocto", - "yolo", - "Yukihiko", - "Yuuzou", "zanecodes", "Zanetti", "Zapp", - "zenoss", "zeproc", "ZEROEXEC", "ZEROINIT", @@ -2136,7 +1894,6 @@ "zolo", "zombiejs", "Zuazo", - "Zygmuntowicz", "zypp" ], // flagWords - list of words to be always considered incorrect diff --git a/lib/chef/http.rb b/lib/chef/http.rb index eed2a41815..bf5361d4b5 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -154,7 +154,7 @@ class Chef rescue Net::HTTPClientException => e http_attempts += 1 response = e.response - if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 + if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts >= 0 Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else @@ -193,7 +193,7 @@ class Chef rescue Net::HTTPClientException => e http_attempts += 1 response = e.response - if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 + if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts >= 0 Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else @@ -249,7 +249,7 @@ class Chef rescue Net::HTTPClientException => e http_attempts += 1 response = e.response - if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 + if response.is_a?(Net::HTTPNotAcceptable) && version_retries - http_attempts >= 0 Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else @@ -428,7 +428,7 @@ class Chef response, request, return_value = yield # handle HTTP 50X Error if response.is_a?(Net::HTTPServerError) && !Chef::Config.local_mode - if http_retry_count - http_attempts + 1 > 0 + if http_retry_count - http_attempts >= 0 sleep_time = 1 + (2**http_attempts) + rand(2**http_attempts) Chef::Log.error("Server returned error #{response.code} for #{url}, retrying #{http_attempts}/#{http_retry_count} in #{sleep_time}s") sleep(sleep_time) @@ -438,7 +438,7 @@ class Chef return [response, request, return_value] end rescue SocketError, Errno::ETIMEDOUT, Errno::ECONNRESET => e - if http_retry_count - http_attempts + 1 > 0 + if http_retry_count - http_attempts >= 0 Chef::Log.error("Error connecting to #{url}, retry #{http_attempts}/#{http_retry_count}") sleep(http_retry_delay) retry @@ -446,21 +446,21 @@ class Chef e.message.replace "Error connecting to #{url} - #{e.message}" raise e rescue Errno::ECONNREFUSED - if http_retry_count - http_attempts + 1 > 0 + if http_retry_count - http_attempts >= 0 Chef::Log.error("Connection refused connecting to #{url}, retry #{http_attempts}/#{http_retry_count}") sleep(http_retry_delay) retry end raise Errno::ECONNREFUSED, "Connection refused connecting to #{url}, giving up" rescue Timeout::Error - if http_retry_count - http_attempts + 1 > 0 + if http_retry_count - http_attempts >= 0 Chef::Log.error("Timeout connecting to #{url}, retry #{http_attempts}/#{http_retry_count}") sleep(http_retry_delay) retry end raise Timeout::Error, "Timeout connecting to #{url}, giving up" rescue OpenSSL::SSL::SSLError => e - if (http_retry_count - http_attempts + 1 > 0) && !e.message.include?("certificate verify failed") + if (http_retry_count - http_attempts >= 0) && !e.message.include?("certificate verify failed") Chef::Log.error("SSL Error connecting to #{url}, retry #{http_attempts}/#{http_retry_count}") sleep(http_retry_delay) retry @@ -470,11 +470,7 @@ class Chef end def version_retries - @version_retries ||= if options[:version_class] - options[:version_class].possible_requests - else - 0 - end + @version_retries ||= options[:version_class]&.possible_requests || 1 end # @api private diff --git a/lib/chef/http/authenticator.rb b/lib/chef/http/authenticator.rb index e65e93d2ac..4a29fcea33 100644 --- a/lib/chef/http/authenticator.rb +++ b/lib/chef/http/authenticator.rb @@ -68,6 +68,8 @@ class Chef version_class.best_request_version elsif api_version api_version + elsif Chef::ServerAPIVersions.instance.negotiated? + Chef::ServerAPIVersions.instance.max_server_version.to_s else DEFAULT_SERVER_API_VERSION end diff --git a/lib/chef/resource/windows_feature_powershell.rb b/lib/chef/resource/windows_feature_powershell.rb index b8a7956358..d165dca959 100644 --- a/lib/chef/resource/windows_feature_powershell.rb +++ b/lib/chef/resource/windows_feature_powershell.rb @@ -182,6 +182,12 @@ class Chef # @return [void] def reload_cached_powershell_data Chef::Log.debug("Caching Windows features available via Get-WindowsFeature.") + + # + # FIXME FIXME FIXME + # The node object should not be used for caching state like this and this is not a public API and may break. + # FIXME FIXME FIXME + # node.override["powershell_features_cache"] = Mash.new node.override["powershell_features_cache"]["enabled"] = [] node.override["powershell_features_cache"]["disabled"] = [] diff --git a/lib/chef/server_api_versions.rb b/lib/chef/server_api_versions.rb index f550fc1d66..30e2802ef0 100644 --- a/lib/chef/server_api_versions.rb +++ b/lib/chef/server_api_versions.rb @@ -51,6 +51,10 @@ class Chef @unversioned end + def negotiated? + !@versions.nil? || unversioned? + end + def reset! @versions = nil @unversioned = false diff --git a/lib/chef/version.rb b/lib/chef/version.rb index 522edce374..883bfbb0bd 100644 --- a/lib/chef/version.rb +++ b/lib/chef/version.rb @@ -23,7 +23,7 @@ require_relative "version_string" class Chef CHEF_ROOT = File.expand_path("..", __dir__) - VERSION = Chef::VersionString.new("16.3.43") + VERSION = Chef::VersionString.new("16.3.45") end # diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index b1a3724a35..7e969fd3a3 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -18,7 +18,7 @@ GIT GIT remote: https://github.com/chef/omnibus-software - revision: 70b006114a9ed20899ef32fedb863ee517a37322 + revision: d0427be1405e0a6230109fd51cd29e7967ffbdb5 branch: master specs: omnibus-software (4.0.0) @@ -32,7 +32,7 @@ GEM artifactory (3.0.15) awesome_print (1.8.0) aws-eventstream (1.1.0) - aws-partitions (1.345.0) + aws-partitions (1.346.0) aws-sdk-core (3.104.3) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) @@ -251,7 +251,7 @@ GEM octokit (4.18.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - ohai (16.3.0) + ohai (16.3.2) chef-config (>= 12.8, < 17) chef-utils (>= 16.0, < 17) ffi (~> 1.9) @@ -267,7 +267,7 @@ GEM pastel (0.7.4) equatable (~> 0.6) tty-color (~> 0.5) - pedump (0.6.0) + pedump (0.6.1) awesome_print iostruct (>= 0.0.4) multipart-post (>= 2.0.0) diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb index 179d9a6a08..f21f3e30f0 100644 --- a/omnibus_overrides.rb +++ b/omnibus_overrides.rb @@ -5,10 +5,10 @@ # software here: bundle exec rake dependencies:update_omnibus_gemfile_lock override :rubygems, version: "3.1.2" # pin to what ships in the ruby version override :bundler, version: "2.1.4" # pin to what ships in the ruby version -override "libarchive", version: "3.4.2" +override "libarchive", version: "3.4.3" override "libffi", version: "3.2.1" override "libiconv", version: "1.15" -override "liblzma", version: "5.2.4" +override "liblzma", version: "5.2.5" override "libtool", version: "2.4.2" override "libxml2", version: "2.9.10" override "libxslt", version: "1.1.34" diff --git a/spec/unit/server_api_spec.rb b/spec/unit/server_api_spec.rb index 1b5d729383..5d78c4bd9b 100644 --- a/spec/unit/server_api_spec.rb +++ b/spec/unit/server_api_spec.rb @@ -116,17 +116,36 @@ describe Chef::ServerAPI do it "500 on a get retries and gets correctly " do WebMock.disable_net_connect! - get_body = { bar: "baz" } headers = { "Accept" => "application/json", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3", "Host" => "chef.example.com:4000", "X-Chef-Version" => Chef::VERSION, "X-Ops-Sign" => "algorithm=sha1;version=1.1;", "X-Ops-Userid" => "silent-bob" } stub_request(:get, "http://chef.example.com:4000/foo").with(headers: headers).to_return(status: [500, "Internal Server Error"]) stub_request(:get, "http://chef.example.com:4000/foo").with(headers: headers).to_return(status: 200, body: "", headers: {}) client.get("foo") end - end - it "does not retry a 406 Not Acceptable" do - WebMock.disable_net_connect! - stub_request(:get, "http://chef.example.com:4000/foo").to_return(status: [406, "Not Acceptable"]) - expect { client.get("foo") }.to raise_error(Net::HTTPServerException) + it "406 on a post does protocol negotiation" do + WebMock.disable_net_connect! + post_body = { bar: "baz" } + body_406 = '{"error":"invalid-x-ops-server-api-version","message":"Specified version 2 not supported","min_version":0,"max_version":1}' + stub_request(:post, "http://chef.example.com:4000/foo").with(body: post_body.to_json, headers: { "X-Ops-Server-Api-Version" => "2" }).to_return(status: [406, "Not Acceptable"], body: body_406 ) + stub_request(:post, "http://chef.example.com:4000/foo").with(body: post_body.to_json, headers: { "X-Ops-Server-Api-Version" => "0" }).to_return(status: 200, body: "", headers: {}) + client.post("foo", post_body) + end + + it "406 on a put does protocol negotiation" do + WebMock.disable_net_connect! + put_body = { bar: "baz" } + body_406 = '{"error":"invalid-x-ops-server-api-version","message":"Specified version 2 not supported","min_version":0,"max_version":1}' + stub_request(:put, "http://chef.example.com:4000/foo").with(body: put_body.to_json, headers: { "X-Ops-Server-Api-Version" => "2" }).to_return(status: [406, "Not Acceptable"], body: body_406 ) + stub_request(:put, "http://chef.example.com:4000/foo").with(body: put_body.to_json, headers: { "X-Ops-Server-Api-Version" => "0" }).to_return(status: 200, body: "", headers: {}) + client.put("foo", put_body) + end + + it "406 on a get does protocol negotiation" do + WebMock.disable_net_connect! + body_406 = '{"error":"invalid-x-ops-server-api-version","message":"Specified version 2 not supported","min_version":0,"max_version":1}' + stub_request(:get, "http://chef.example.com:4000/foo").with(headers: { "X-Ops-Server-Api-Version" => "2" }).to_return(status: [406, "Not Acceptable"], body: body_406 ) + stub_request(:get, "http://chef.example.com:4000/foo").with(headers: { "X-Ops-Server-Api-Version" => "0" }).to_return(status: 200, body: "", headers: {}) + client.get("foo") + end end end |