Skip to content

Merge of 4.22 into main left Boolean.getBoolean and a non-zone use.https.to.upload lookup #14766

Open

Description

@bhouse-nexthop

problem

The 4.22 -> main merge 82bfa9f left two lines on main that neither parent had:

file merged line before the merge (main) effect
ApiResponseHelper.getDataStoreRole Boolean.getBoolean(value) new Boolean(value) Boolean.getBoolean reads a JVM system property named by value, so it is always false. Snapshots on primary storage that supports storage-system snapshots are reported with the Image role.
VolumeApiServiceImpl.uploadVolume UseHttpsToUpload.value() UseHttpsToUpload.valueIn(zoneId) (#11539) The zone-level use.https.to.upload value is ignored for volume uploads; templates and the SSVM still use it, so the volume upload URL can use the wrong protocol.

Related: #14760 removes a duplicated block left by the same merge.

versions

main since 82bfa9f. 4.22 is not affected (it never had #11539, and still has new Boolean(value)).

The steps to reproduce the bug

  1. Set use.https.to.upload to false at zone level, keep the global value true.
  2. Call getUploadParamsForVolume in that zone.
  3. The returned postURL is https://...; for getUploadParamsForTemplate it is http://....

For the first bug: take a volume snapshot on primary storage whose driver reports STORAGE_SYSTEM_SNAPSHOT=true and list it; the response shows the Image role.

What to do about it?

Use Boolean.parseBoolean(value) and UseHttpsToUpload.valueIn(zoneId).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions