Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Nov 6, 2018

The new pipeline handles Content-Encoding gzip:

$ curl -LI --compressed https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/47.73/redhat-coreos-maipo-47.73-qemu.qcow2
HTTP/1.1 302 Moved Temporarily
Server: nginx/1.12.1
Date: Tue, 06 Nov 2018 20:55:06 GMT
Content-Type: text/html
Content-Length: 161
Location: https://d26v6vn1y7q7fv.cloudfront.net/releases/maipo/47.73/redhat-coreos-maipo-47.73-qemu.qcow2
Set-Cookie: ...; path=/; HttpOnly; Secure

HTTP/1.1 200 OK
Content-Type: binary/octet-stream
Content-Length: 726878219
Connection: keep-alive
Date: Tue, 06 Nov 2018 20:23:37 GMT
Last-Modified: Tue, 06 Nov 2018 17:56:36 GMT
ETag: "021080ef3b515d2443be3749ebbb0b08-87"
Content-Encoding: gzip
Accept-Ranges: bytes
Server: AmazonS3
Age: 1890
X-Cache: Hit from cloudfront
Via: 1.1 d85d7507ed6501757cfe600c02a26c7d.cloudfront.net (CloudFront)
X-Amz-Cf-Id: ...

so we can rely on Go's default compression handling. See DisableCompression, which defaults to false. To confirm the default handling, try to retrieve from a local server:

$ export OPENSHIFT_INSTALL_LIBVIRT_IMAGE=http://localhost:8080/example.qcow
$ openshift-install --dir=wking create cluster
INFO Fetching OS image...
FATAL Error executing openshift-install: failed to fetch Terraform Variables: failed to generate asset "Terraform Variables": failed to get Tfvars: failed to use cached libvirt image: Get http://localhost:8080/example.qcow: EOF

In another terminal, I was using Ncat as a dummy server to capture request headers:

$ nc -l -p 8080 </dev/null
GET /example.qcow HTTP/1.1
Host: localhost:8080
User-Agent: Go-http-client/1.1
Accept-Encoding: gzip

This commit drops the now-unnecessary suffix handling from 7abe94d (#280).

The new pipeline handles Content-Encoding gzip:

  $ curl -LI --compressed https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/47.73/redhat-coreos-maipo-47.73-qemu.qcow2
  HTTP/1.1 302 Moved Temporarily
  Server: nginx/1.12.1
  Date: Tue, 06 Nov 2018 20:55:06 GMT
  Content-Type: text/html
  Content-Length: 161
  Location: https://d26v6vn1y7q7fv.cloudfront.net/releases/maipo/47.73/redhat-coreos-maipo-47.73-qemu.qcow2
  Set-Cookie: ...; path=/; HttpOnly; Secure

  HTTP/1.1 200 OK
  Content-Type: binary/octet-stream
  Content-Length: 726878219
  Connection: keep-alive
  Date: Tue, 06 Nov 2018 20:23:37 GMT
  Last-Modified: Tue, 06 Nov 2018 17:56:36 GMT
  ETag: "021080ef3b515d2443be3749ebbb0b08-87"
  Content-Encoding: gzip
  Accept-Ranges: bytes
  Server: AmazonS3
  Age: 1890
  X-Cache: Hit from cloudfront
  Via: 1.1 d85d7507ed6501757cfe600c02a26c7d.cloudfront.net (CloudFront)
  X-Amz-Cf-Id: ...

so we can rely on Go's default compression handling.  See
DisableCompression, which defaults to false, in [1].  To confirm the
default handling, try to retrieve from a local server:

  $ export OPENSHIFT_INSTALL_LIBVIRT_IMAGE=http://localhost:8080/example.qcow
  $ openshift-install --dir=wking create cluster
  INFO Fetching OS image...
  FATAL Error executing openshift-install: failed to fetch Terraform Variables: failed to generate asset "Terraform Variables": failed to get Tfvars: failed to use cached libvirt image: Get http://localhost:8080/example.qcow: EOF

In another terminal, I was using Ncat as a dummy server to capture
request headers:

  $ nc -l -p 8080 </dev/null
  GET /example.qcow HTTP/1.1
  Host: localhost:8080
  User-Agent: Go-http-client/1.1
  Accept-Encoding: gzip

This commit drops the now-unnecessary suffix handling from 7abe94d
(config/libvirt/cache: Decompress when URI has ".gz" suffix,
2018-09-21, openshift#280).

[1]: https://golang.org/pkg/net/http/#Transport
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 6, 2018
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2018
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,wking]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wking
Copy link
Member Author

wking commented Nov 6, 2018

e2e-aws:

* module.vpc.aws_eip.nat_eip[4]: 1 error(s) occurred:

* aws_eip.nat_eip.4: Error creating EIP: AddressLimitExceeded: The maximum number of addresses has been reached.
	status code: 400, request id: ca098949-60ae-4fd4-882d-9f4527f1561f

I'll run my cleanup script.

@wking
Copy link
Member Author

wking commented Nov 6, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit 810d2ba into openshift:master Nov 6, 2018
@wking wking deleted the libvirt-content-encoding-gzip branch November 7, 2018 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants