Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Handle old failed tasks on vCloud Entities#18

Open
tlawrence wants to merge 3 commits into
cloudfoundry-attic:masterfrom
UKCloud:master
Open

Handle old failed tasks on vCloud Entities#18
tlawrence wants to merge 3 commits into
cloudfoundry-attic:masterfrom
UKCloud:master

Conversation

@tlawrence

Copy link
Copy Markdown

vCloud maintains a list of historical tasks for a vApp. These tasks are returned in the Xml element of a GET vAPP response.
When BOSH recomposes a vApp (to merge in new VMs for example) currently it aborts the BOSH Task if any failed tasks are identified.
This PR enables a configurable time threshold @old_task_threshold which tells the vcd_client library to disregard tasks older than the value (in minutes). By default tasks older than an hour will be ignored.

@amarneris

Copy link
Copy Markdown

Hello @tlawrence,

This resolves the following issue raised here:
cloudfoundry-attic/bosh-vcloud-cpi-release#10

Thank you for doing this!

Regards,
Andreas

@flawedmatrix

Copy link
Copy Markdown
Contributor

Hello @tlawrence,

We were not able to cleanly apply this patch to the current vCloud release repo. Could you please make your changes against that repo?

$ git apply --verbose --check --directory=src/bosh_vcloud_cpi/ old_tasks.patch
Checking patch src/bosh_vcloud_cpi/lib/cloud/vcloud/vcd_client.rb...
Checking patch src/bosh_vcloud_cpi/lib/cloud/vcloud/xml/wrapper_classes/task.rb...
Checking patch src/bosh_vcloud_cpi/spec/assets/existing_vapp_template_instantiate_old_tasks_response.xml...
Checking patch src/bosh_vcloud_cpi/spec/assets/test-director-config.yml...
Checking patch src/bosh_vcloud_cpi/spec/unit/vcloud/vcd_client_spec.rb...
error: while searching for:
        task.stub(:operation).and_return(task_operation)
        task.stub(:details).and_return(task_details)
        task.stub(:status).and_return VCloudSdk::Xml::TASK_STATUS[:ERROR]

        entity.stub(:running_tasks) {[task]}
        entity.stub(:prerunning_tasks) {[]}

error: patch failed: src/bosh_vcloud_cpi/spec/unit/vcloud/vcd_client_spec.rb:255
error: src/bosh_vcloud_cpi/spec/unit/vcloud/vcd_client_spec.rb: patch does not apply
Checking patch src/bosh_vcloud_cpi/spec/unit/vcloud/xml/task_spec.rb...

Thanks,
Edwin & Felix

@tlawrence

Copy link
Copy Markdown
Author

Will do, looks like the problem is due to RSpecupgrade on the bosh-vcloud-cpi-release repo.
seeing as those changes arent reflected here I guess that this repo is now dead and wont be commited to any more.
If so could the README be updated to reflect that? I would have made all changes to a fork of the other release repo if I had seen an obvious pointer here...

Thanks

Tim

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants