vmware-archive / pcf-pipelines

PCF Pipelines
Apache License 2.0
158 stars 282 forks source link

Necessary to download pivnet stemcells and restore them? #357

Closed aegershman closed 6 years ago

aegershman commented 6 years ago

Issue

When upgrading from opsmgr 2.2.4 to 2.2.6, I noticed a twofold problem:

  1. the download-stemcells task does not account for xenial stemcells because the product glob pattern in the task does not account for it
  2. Downloading and restoring the xenial stemcells wasn't necessary, as the stemcells were already present after import-opsmgr-settings ran and I logged into the opsmgr. This makes me wonder if it is necessary to download pivnet stemcells / restore them at all?

Context

We do not use pcf-pipelines directly. However, we did take inspiration from the upgrade-opsmgr pipeline, which has code to download/restore stemcells. At this point, however, we aren't sure if we even need to do that step at all?

Our upgrade-opsmgr pipeline job which imports the opsmgr settings after upgrading the opsmgr VM. The pipeline looks (roughly) like this:

- name: import-opsman-settings
  plan:
  - task: import-opsmgr-settings
    file: pipeline-source/tasks/import-opsmgr-settings/task.yml
  - task: download-stemcells # <--- fails here
    file: pipeline-source/tasks/download-pivnet-stemcells/task.yml
  - task: restore-stemcells
    file: pipeline-source/tasks/restore-stemcells/task.yml

Steps to Reproduce

Run the download-pivnet-stemcells task using a diagnostic-report(I included ours) which contains a product relying on the xenial stemcells (e.g. event alerts 1.2.3 which uses xenial 97.15)

Possible Fix

  1. if the exporting/importing of opsmgr settings includes all the stemcells required for installed products, you can probably just remove the download-pivnet-stemcells/restore-stemcells tasks altogether
  2. modify the download-pivnet-stemcells task to account for products which require xenial stemcells

Logs and Screenshots

screen shot 2018-09-11 at 10 52 46 am diagnostic-report.zip

thanks for your time!

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

jtarchie commented 6 years ago

I'm not sure I follow on the Possible Fix 1. What does the import/export have to do with the stemcells?

Edit: You mean the actual stemcell files?

aegershman commented 6 years ago

Sorry, I mean that if the process of upgrading opsmgr no longer requires that you re-import all the stemcells after you upgrade (which is shown here in the upgrade-opsmgr-pipeline), then download-pivnet-stemcells and restore-stemcells are no longer required at all

The pipelines are certified to work with opsmgr 2.0.x, so maybe restoring the stemcells is no longer needed in later versions.

wbean1 commented 6 years ago

:+1: we're experiencing this issue as well, even on v0.23.7 as pcf-pipelines/tasks/download-pivnet-stemcells/task.sh does not have support for the xenial stemcell slug. I'm also not sure this step is needed, as opsmgr apply works fine even after it errors.

jtarchie commented 6 years ago

@wbean1, how are you pulling the version, from Pivnet release or Github?

wbean1 commented 6 years ago

@jtarchie currently sourcing from pivnet, but I can switch if you'd like us to test a tag. We were using the v0.23.7-rc.6 git tag for a few days to get us through all the tile upgrades that fetch xenial.

jtarchie commented 6 years ago

Are you getting the error messages? What tiles is this affecting for you?

I'd like to recreate it locally.

wbean1 commented 6 years ago

all tiles work fine now, its the upgrade-opsmgr pipeline, task download-stemcells (pcf-pipelines/tasks/download-pivnet-stemcells/task.yml) that fails if your opsmgr has any xenial stemcells already imported. We're specifically running the vcenter pipeline, but it looks like all the iaas's would encounter this issue.

screen shot 2018-09-28 at 10 51 45 am

jtarchie commented 6 years ago

Thanks, we'll take a look.

fredwangwang commented 6 years ago

@aegershman @wbean1 confirmed that you can remove download-pivnet-stemcells and restore-stemcells tasks from the upgrading pipeline as a temporary workaround.

They are some legacy code remained to address some 1.x OpsMan version when it did not bundle with the required stemcell. Since each pipeline release is to address a specific OpsMan version. there is no point to have those tasks remain around.

We are in the process of cutting a new release to address the issue. For now, just remove those two tasks from the upgrade-ops-manager pipeline and it should work.

aegershman commented 6 years ago

Thanks for the confirmation, I appreciate it 👍