1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Commit Graph

5690 Commits

Author SHA1 Message Date
Alex Crawford
be3e4e94d9 asset/cluster: various cleanups
This removes an inaccurate comment and an unused variable/dependency.
2019-01-04 09:53:44 -08:00
OpenShift Merge Robot
15937bee9a Merge pull request #986 from ldomb/enahncetrshooting
Squashed all commits into one for the SSH troubleshooting guide
2019-01-03 14:07:35 -08:00
Laurent Domb
15c4320819 update for docs/user/troubleshooting: Document 'core' user and SSH key injection
Previously, these platform-agnostic docs left users guessing about which username to use when SSHing in.

And folks with AWS experience might be surprised that we don't use AWS key pairs, so add some wording to avoid them thinking the lack of an AWS key pair is the source of their SSH issues.
2019-01-03 16:20:26 -05:00
OpenShift Merge Robot
713289e20b Merge pull request #977 from mykaul/mykaul-patch-libvirt-host-passthrough
libvirt: use host-passthrough CPU type for libvirt VMs
2019-01-02 18:04:14 -08:00
OpenShift Merge Robot
ae707a32ce Merge pull request #980 from wking/broken-master-node-reference
docs/user/troubleshooting: Fix master-node(s) reference
2019-01-02 15:17:40 -08:00
Yaniv Kaul
529114ac0f libvirt: Use host-passthrough CPU type
For both bootstrap and master VMs.
Should be slightly faster, I hope.
From https://wiki.openstack.org/wiki/LibvirtXMLCPUModel :

"host-passthrough" - this causes libvirt to tell KVM to passthrough the host CPU with no modifications.
The difference to host-model, instead of just matching feature flags, every last detail of the host CPU is matched.
This gives absolutely best performance, and can be important to some apps which check low level CPU details,
but it comes at a cost wrt migration.
The guest can only be migrated to an exactly matching host CPU.
2019-01-02 22:35:47 +02:00
W. Trevor King
5311b93e6f docs/user/troubleshooting: Fix master-node(s) reference
This has been broken since the file landed in 7bd9291c (docs: add
troubleshooting guide, 2018-11-07, #638).
2019-01-02 11:41:55 -08:00
OpenShift Merge Robot
f0066c4ae1 Merge pull request #789 from sttts/sttts-remove-config-overrides
bootkube: remove unused config overrides
2019-01-02 11:03:39 -08:00
OpenShift Merge Robot
5e7b36d635 Merge pull request #788 from russellb/openstack-flavor-support
openstack: Add flavor selection support.
2018-12-24 00:31:46 -08:00
OpenShift Merge Robot
54a432c608 Merge pull request #971 from wking/version-0.8.0
CHANGELOG: Document changes since v0.7.0
v0.8.0-master
2018-12-23 06:57:24 -08:00
W. Trevor King
724455df5e CHANGELOG: Document changes since v0.7.0
Through c0104bd6 (Merge pull request #970 from
openshift/revert-927-aws-public-worker-ips, 2018-12-21).
2018-12-22 21:42:42 -08:00
OpenShift Merge Robot
c0104bd60f Merge pull request #970 from openshift/revert-927-aws-public-worker-ips
Revert "pkg/asset/machines/aws/machinesets: Give workers public IPs (for now)"
2018-12-21 20:11:02 -08:00
OpenShift Merge Robot
a29ed8fe93 Merge pull request #955 from wking/decouple-libvirt
*: Make libvirt support completely conditional (behind TAGS=libvirt)
2018-12-21 18:25:40 -08:00
W. Trevor King
432f28355a *: Make libvirt support completely conditional (behind TAGS=libvirt)
Previously, destroy support was behind TAGS=libvirt_destroy and create
support was always built in.  But since 3fb4400c (terraform/plugins:
add `libvirt`, `aws`, `ignition`, `openstack` to KnownPlugins,
2018-12-14, #919), the bundled libvirt Terraform provider has also
been behind libvirt_destroy.  That leads to cluster creation failing
with:

  $ openshift-install create cluster
  ...
  ERROR Missing required providers.
  ERROR
  ERROR The following provider constraints are not met by the currently-installed
  ERROR provider plugins:
  ERROR
  ERROR * libvirt (any version)
  ERROR
  ERROR Terraform can automatically download and install plugins to meet the given
  ERROR constraints, but this step was skipped due to the use of -get-plugins=false
  ERROR and/or -plugin-dir on the command line.
  ...

With this commit, folks trying to 'create cluster' without libvirt
compiled in will get:

  FATAL failed to fetch Common Manifests: failed to load asset "Install Config": invalid "install-config.yaml" file: platform: Invalid value: types.Platform{AWS:(*aws.Platform)(nil), Libvirt:(*libvirt.Platform)(0xc4209511f0), OpenStack:(*openstack.Platform)(nil)}: platform must be one of: aws, openstack

before we get to Terraform.

Now that the build tag guards both creation and deletion, I've renamed
it from 'libvirt_destroy' to the unqualified 'libvirt'.

I've also adjusted the install-config validation testing to use
regular expressions so we can distinguish between failures because
libvirt was not compiled in as a valid platform and failures because
some portion of the libvirt configuration was broken.  In order to get
stable error messages for comparison, I've added some strings.Sort
calls for various allowed-value string-slice computations.
2018-12-21 13:09:29 -08:00
Clayton Coleman
e026b8d7fb Revert "pkg/asset/machines/aws/machinesets: Give workers public IPs (for now)" 2018-12-21 15:52:59 -05:00
OpenShift Merge Robot
f93dcff300 Merge pull request #959 from staebler/fix_up_yml_to_yaml_change
*: change references to install-config.yml with install-config.yaml
2018-12-21 05:46:57 -08:00
OpenShift Merge Robot
4ea77b8a67 Merge pull request #961 from sallyom/libvirt-ci-dockerfile-fix
add libvirt tag to libvirt-ci Dockerfile
2018-12-21 03:44:24 -08:00
OpenShift Merge Robot
d29ce1fb2d Merge pull request #956 from wking/libvirt-provider-rollback
pkg/terraform/exec/plugins/vendor: Roll back libvirt to 2ad0228349
2018-12-21 00:22:35 -08:00
OpenShift Merge Robot
fb2f1d8881 Merge pull request #962 from staebler/mock_generation
script for generating mock
2018-12-20 21:02:08 -08:00
OpenShift Merge Robot
beee312cf4 Merge pull request #960 from abhinavdahiya/basedomain_fix
asset/installconfig: fallback to freeform basedomain on aws on throttle error
2018-12-20 12:13:08 -08:00
staebler
81c87cb0e7 pkg: update test mocks using latest gomock
The hack/gen-gomock.sh script uses a newer version of gomock than
what was used to create the mocks. These changes update the mocks
so that subsequent runs of hack/gen-gomock.sh will not produce
changes to the test mocks.
2018-12-20 14:08:08 -05:00
staebler
825a3972bf hack: script to generate mocks
Create a script for generating test mocks.
2018-12-20 14:08:04 -05:00
Sally O'Malley
60595a581a add LIBVIRT tag to libvirt-ci Dockerfile 2018-12-20 13:47:57 -05:00
Abhinav Dahiya
566d65e755 asset/installconfig: fallback to freeform basedomain on aws on throttle error 2018-12-20 10:46:58 -08:00
staebler
5178d381c0 *: change references to install-config.yml with install-config.yaml
The file name for the Install Config asset was changed to install-config.yaml
in commit 869cbb67ba. This commit changes
the documentation and code comments to use the new name of the file.
2018-12-20 11:33:33 -05:00
Russell Bryant
aa4fd8913e openstack: Add flavor selection support.
OpenStack flavors (analogous to AWS instance types) are not
standardized, so we can't pick a default that works across all
environments.  This patch adds this as one of the items that must be
specified.
2018-12-20 13:15:55 +00:00
W. Trevor King
72e473569d pkg/terraform/exec/plugins/vendor: Roll back libvirt to 2ad0228349
The final pull request landing in the provider's v0.5.1 broke the
installer on my libvirt 3.9.0 [1]:

  libvirt_ignition.master: Creating...
    ...
  module.volume.libvirt_volume.coreos_base: Creating...
    ...
  libvirt_network.net: Creating...
    ...
  module.bootstrap.libvirt_ignition.bootstrap: Creating...
    ...
  libvirt_ignition.master: Creation complete after 0s (ID: /home/trking/VirtualMachines/wking-mast...n;5c1b382d-27af-08b2-1fff-8dafabae17c3)
  module.bootstrap.libvirt_ignition.bootstrap: Still creating... (10s elapsed)
  module.bootstrap.libvirt_ignition.bootstrap: Still creating... (20s elapsed)
  module.bootstrap.libvirt_ignition.bootstrap: Still creating... (30s elapsed)
  ...
  module.bootstrap.libvirt_ignition.bootstrap: Still creating... (5m0s elapsed)

  Error: Error applying plan:

  3 error(s) occurred:

  * libvirt_network.net: 1 error(s) occurred:

  * libvirt_network.net: Error clearing libvirt network: virError(Code=38, Domain=7, Message='End of file while reading data: Input/output error')
  * module.volume.libvirt_volume.coreos_base: 1 error(s) occurred:

  * libvirt_volume.coreos_base: Error creating libvirt volume: virError(Code=38, Domain=7, Message='End of file while reading data: Input/output error')
  * module.bootstrap.libvirt_ignition.bootstrap: 1 error(s) occurred:

  * libvirt_ignition.bootstrap: Error creating libvirt volume for Ignition wking-bootstrap.ign: virError(Code=1, Domain=7, Message='internal error: client socket is closed')

Roll back to keep the lock that was dropped upstream until we
understand this better.

Generated with:

  $ cd pkg/terraform/exec/plugins
  $ emacs Gopkg.toml  # adjust to pin to 2ad0228349
  $ dep ensure

using:

  $ dep version
  dep:
   version     : v0.5.0
   build date  :
   git hash    : 22125cf
   go version  : go1.10.3
   go compiler : gc
   platform    : linux/amd64
   features    : ImportDuringSolve=false

[1]: https://github.com/dmacvicar/terraform-provider-libvirt/pull/495#issuecomment-448891285
2018-12-19 22:51:48 -08:00
OpenShift Merge Robot
ac006ae671 Merge pull request #949 from abhinavdahiya/terraform_vendor
terraform: only use embedded plugins when `release` tag is set
2018-12-19 18:49:07 -08:00
OpenShift Merge Robot
a2e193ab5b Merge pull request #951 from abhinavdahiya/fix_aws_vpc_id
data/data/aws: use vpc configuration block for route53 zone `int`
2018-12-19 16:50:19 -08:00
OpenShift Merge Robot
ded0735f92 Merge pull request #939 from wking/aws-base-domain-choices
pkg/asset/installconfig/aws: Make base-domain a select widget
2018-12-19 15:31:07 -08:00
Abhinav Dahiya
37f69179b6 data/data/aws: use vpc configuration block for route53 zone int
Seeing this error when running on AWS.
```console
ERROR
ERROR Warning: aws_route53_zone.int: "vpc_id": [DEPRECATED] use 'vpc' attribute instead
ERROR
ERROR
```

https://www.terraform.io/docs/providers/aws/r/route53_zone.html#vpc_id states the `vpc_id` field is deprecated.
here are the fields supported by `vpc` configuration block https://github.com/terraform-providers/terraform-provider-aws/blob/v1.51.0/aws/resource_aws_route53_zone.go#L43
2018-12-19 15:27:16 -08:00
W. Trevor King
390cf77ec8 pkg/asset/installconfig/aws: Make base-domain a select widget
This used to be covered in the docs from fa7c9e3a (*: Copy route53
baseDomain advice to openshift-install locations, 2018-09-27, #353),
but in order to see those you'd need to have a moment of doubt and
think to hit '?'.  Even if you read the docs, it's possible you'd typo
the base domain or add a trailing period (theoretically trailing
periods would be fine, but they may have some issues at the moment
[1]).

With this commit, we go ahead and fetch available public zones
ourselves, so AWS users don't have to.  And it also reduces the help
noise on the base-domain input for users targeting non-AWS platforms.

The empty struct map is slightly more efficient than a boolean map,
because the empty struct takes up no space [2].  Although it's hard to
imagine an account with enough public zones for that space savings to
be significant.

The IsForbidden handling lets us fall back to the free-form input if
we aren't authorized to list zones for the select widget:

  $ openshift-install --dir=wking create install-config
  ? SSH Public Key <none>
  ? Platform aws
  ? Region us-west-1
  ERROR list hosted zones: AccessDenied: User: arn:aws:iam::...:user/trking is not authorized to perform: route53:ListHostedZones with an explicit deny
          status code: 403, request id: 1d..29
  ? Base Domain [? for help]

[1]: https://github.com/openshift/installer/issues/831#issue-388771261
[2]: https://dave.cheney.net/2014/03/25/the-empty-struct
2018-12-19 14:12:40 -08:00
Abhinav Dahiya
ff3c4307c0 terraform: only use embedded plugins when release tag is set 2018-12-19 13:18:29 -08:00
OpenShift Merge Robot
ccf5280d3c Merge pull request #942 from wking/move-regions-into-validation-package
pkg/types/aws/validation: Move ValidRegions into this package
2018-12-19 11:57:00 -08:00
OpenShift Merge Robot
4172389fc4 Merge pull request #941 from wking/gopkg-lock-aws-request
Gopkg: Lock aws/request
2018-12-19 05:12:00 -08:00
W. Trevor King
47bc04d216 pkg/types/aws/validation: Move ValidRegions into this package
And rename to 'Regions', since the target package is already about
validation.  ValidRegions was added to the aws package in b2d6fa40
(validate: simplify CIDR validation, 2018-11-27, #711), but it's just
used for validation and it isn't a type defintion.
2018-12-18 23:59:25 -08:00
OpenShift Merge Robot
8d4df8557d Merge pull request #934 from ironcladlou/basedomain
Add asset for DNS config
2018-12-18 22:35:54 -08:00
W. Trevor King
428cd88fde Gopkg: Lock aws/request
Generated with:

  $ dep ensure

using:

  $ dep version
  dep:
   version     : v0.5.0
   build date  :
   git hash    : 22125cf
   go version  : go1.10.3
   go compiler : gc
   platform    : linux/amd64
   features    : ImportDuringSolve=false

I hadn't realized I'd need this after 6447e9c4 (pkg/destroy/aws: Don't
give up on Route 53 rate limits, 2018-12-18, #940) added a direct
consumer of this package.
2018-12-18 22:24:35 -08:00
OpenShift Merge Robot
a7468d16b8 Merge pull request #940 from wking/local-aws-destroy
pkg/destroy/aws: Don't give up on Route 53 rate limits
2018-12-18 18:26:09 -08:00
OpenShift Merge Robot
ead9f4b779 Merge pull request #919 from abhinavdahiya/terraform_vendor
vendor all the required terraform plugins
2018-12-18 16:17:27 -08:00
W. Trevor King
a1c4c7c7ac pkg/destroy/aws: Rename "AWSFilter" -> "Filter"
To avoid [1]:

  2018/12/19 00:01:38 Executing test golint
  /go/src/github.com/openshift/installer/pkg/destroy/aws/aws.go:33:6: type name will be used as aws.AWSFilter by other packages, and that stutters; consider calling this Filter
  Found 1 lint suggestions; failing.

[1]: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_installer/940/pull-ci-openshift-installer-master-golint/1879/build-log.txt
2018-12-18 16:06:18 -08:00
W. Trevor King
6447e9c4fd pkg/destroy/aws: Don't give up on Route 53 rate limits
We've been hitting Route 53 rate limits in the busy CI account:

  level=debug msg="Deleting Route53 zones (map[openshiftClusterID:5b0921a0-5e21-4ebf-a5f9-396a92526ec1])"
  level=debug msg="Deleting Route53 zones (map[kubernetes.io/cluster/ci-op-piz2m00h-1d3f3:owned])"
  level=debug msg="error converting r53Zones to native AWS objects: Throttling: Rate exceeded\n\tstatus code: 400, request id: 80e10c03-0306-11e9-b9b6-abeb053f0218"
  level=debug msg="Exiting deleting Route53 zones (map[kubernetes.io/cluster/ci-op-piz2m00h-1d3f3:owned])"
  level=debug msg="error converting r53Zones to native AWS objects: Throttling: Rate exceeded\n\tstatus code: 400, request id: 81cd4026-0306-11e9-9710-21e3250d9953"
  level=debug msg="Exiting deleting Route53 zones (map[openshiftClusterID:5b0921a0-5e21-4ebf-a5f9-396a92526ec1])"

We've had trouble with Route 53 rate limits before; see discussion in
openshift/hive@f945dbb3 (awstagdeprovision: Ignore more errors,
2018-11-27, openshift/hive#113).  With this commit, instead of bailing
part way through listing tags for all the hosted zones, we just retry
that particular zone until it goes through and keep going on tags for
the whole list.  This should reduce our overall load on the Route 53
APIs.
2018-12-18 16:00:08 -08:00
W. Trevor King
5a21112974 vendor: Drop openshift/hive
Generated with:

  $ emacs Gopkg.toml  # drop the hive constraint
  $ dep ensure

using:

  $ dep version
  dep:
   version     : v0.5.0
   build date  :
   git hash    : 22125cf
   go version  : go1.10.3
   go compiler : gc
   platform    : linux/amd64
   features    : ImportDuringSolve=false
2018-12-18 15:09:31 -08:00
W. Trevor King
2ef9c22103 pkg/destroy/aws: Pick a shorter package name
The fact that it's a subpackage of pkg/destroy is sufficient context
without repeating "deprovision" in the package name.  And the fact
that the deprovision is tag based is an implementation detail that
doesn't need to be surfaced in the package name.

Also drop the copyright header.  We're also an Apache-2.0 project, so
this just removes the copyright holder information from the header.
And "the Kubernetes Authors" wasn't all that helpful anyway.  If folks
want to see who authored the contents, they should check the Git
history.  I'm breaking that history here, so here's a list of authors
in case the hive repository goes away or something: Abhinav Dahiya,
Dan Mace, Devan Goodwin, Joel Diaz, Miciah Masters, Thomas Wiest,
and me.
2018-12-18 14:53:43 -08:00
W. Trevor King
a12c45195e pkg/destroy/aws: Bring over hive/contrib/pkg/awstagdeprovision
We've been meaning to take this off the hands of the Hive folks for a
while.  Finally copy it over (I'll drop the vendored copy soon).  This
is a verbatim copy of the file as it stands with
openshift/hive@ad6f8d5b (Merge pull request openshift/hive#143 from
abutcher/capischeme, 2018-12-18).
2018-12-18 14:53:29 -08:00
Abhinav Dahiya
1ee74db118 pkg/terraform: terraform init never downloads plugins
setting the `-get-plugins=false` instructs terraform to not fetch any plugins from the ineternet.
All the plugins required by installer have to be embedded. This allows us to ensure that all the plugins required are
never downloaded from the internet.
2018-12-18 11:24:32 -08:00
Abhinav Dahiya
0502c5c4db terraform: drop Version from API
The last consumers of the api was removed in 41dd7281a6

The version of the terraform is now tied to the version of the installer, so this is no longer required.
2018-12-18 11:23:24 -08:00
Abhinav Dahiya
9ee7399bd6 .github: remove libvirt plugin version invocation 2018-12-18 11:23:24 -08:00
Abhinav Dahiya
cef24b69eb docs: remove sections that ask to install libvirt plugins 2018-12-18 11:23:24 -08:00
Abhinav Dahiya
3e7e15f2d7 data/data: unset version from terraform providers
Terraform loads the on disk plugins to `0.0.0` version. unsettting allows us to use the local plugins
and prevents terraform from trying to fetch the provider from internet.
2018-12-18 11:22:50 -08:00