Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

import opsman task govc not working #328

Open
bmhkb4 opened this issue May 8, 2018 · 8 comments
Open

import opsman task govc not working #328

bmhkb4 opened this issue May 8, 2018 · 8 comments

Comments

@bmhkb4
Copy link

bmhkb4 commented May 8, 2018

Thanks for submitting an issue to pcf-pipelines. To help us triage the issue, please fill out the following form as much as you can:

Issue

I pulled pcf-pipelines latest branch (previously used 1.11) to get my new pcf 2.1 vsphere environment installed. It is failing with:

govc: folder '.' not found

Context

Reverting back to the ~1.11 pcf-pipeline/install-pcf/vsphere/tasks/import-opsman/task.sh fixed the issue. Looks like the only delta is some syntactical things.

Expected result

Opsman to be imported

Current result

Opsman import failing.

Steps to Reproduce

Run brand new install-pcf pipeline with 2.1 variables.

Possible Fix

Revert back.

Logs and Screenshots

team main
update-pcf-pipelines
install-pcf
upgrade-ops-manager
upgrade-ert
configure-ert
upgrade-buildpacks
install-upgrade-redis
install-upgrade-mysql1
install-upgrade-mysql2
install-upgrade-rabbitmq
install-upgrade-app-dynamics
install-upgrade-pcf-metrics
install-upgrade-scs
install-upgrade-jmx-bridge
install-upgrade-healthwatch
install-upgrade-cloud-cache
post-install-pcf
install-upgrade-isolation-segments
deploy-opsman #2
started 18m 52s ago
finished 17m 25s ago
duration 1m 27s
2
1
ref af58db5e9d4ce5dafd0d1ecf0c8d24bd887c4049
pcf-pipelines
product_version 2.1.2#2018-04-11T02:06:41.807Z
pivnet-opsman-product
deploy
Pulling pcfnorm/rootfs@sha256:f770b03b3d4a1364417482df79c9bfa4016fba8802c19b102ea0f3b72555bfd0...
sha256:f770b03b3d4a1364417482df79c9bfa4016fba8802c19b102ea0f3b72555bfd0: Pulling from pcfnorm/rootfs
2d1303edf67c: Pulling fs layer
6fc04387f5ae: Pulling fs layer
388651d2ecea: Pulling fs layer
6fc04387f5ae: Verifying Checksum
6fc04387f5ae: Download complete
388651d2ecea: Verifying Checksum
388651d2ecea: Download complete
2d1303edf67c: Verifying Checksum
2d1303edf67c: Download complete
2d1303edf67c: Pull complete
6fc04387f5ae: Pull complete
388651d2ecea: Pull complete
Digest: sha256:f770b03b3d4a1364417482df79c9bfa4016fba8802c19b102ea0f3b72555bfd0
Status: Downloaded newer image for pcfnorm/rootfs@sha256:f770b03b3d4a1364417482df79c9bfa4016fba8802c19b102ea0f3b72555bfd0

Successfully pulled pcfnorm/rootfs@sha256:f770b03b3d4a1364417482df79c9bfa4016fba8802c19b102ea0f3b72555bfd0.

./pivnet-opsman-product/pcf-vsphere-2.1-build.214.ova
{
"Annotation": "Ops Manager for Pivotal Cloud Foundry\ninstalls and manages PCF products and services.",
"DiskProvisioning": "thin",
"IPAllocationPolicy": "dhcpPolicy",
"IPProtocol": "IPv4",
"InjectOvfEnv": false,
"Name": "",
"NetworkMapping": [
{
"Name": "Network 1",
"Network": ""
}
],
"PowerOn": true,
"PropertyMapping": [
{
"Key": "ip0",
"Value": ""
},
{
"Key": "netmask0",
"Value": ""
},
{
"Key": "gateway",
"Value": ""
},
{
"Key": "DNS",
"Value": ""
},
{
"Key": "ntp_servers",
"Value": ""
},
{
"Key": "admin_password",
"Value": ""
},
{
"Key": "custom_hostname",
"Value": ""
}
],
"WaitForIP": false
}
govc: folder '.' not found

@cf-gitbot
Copy link

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.

@pivotal-maya-kenedy
Copy link

Hello @bmhkb4, thanks for reaching out! We just released v0.23.3 which should address this. Could you try again and reopen this issue if you are still seeing this issue?

@bmhkb4
Copy link
Author

bmhkb4 commented May 9, 2018

Updated to the latest and it is still broken =\

@bmhkb4
Copy link
Author

bmhkb4 commented May 9, 2018

# govc folder.create "$OM_VM_FOLDER"
govc: folder '.' not found
# echo $OM_VM_FOLDER
pcf_vms

It should never be trying to create the folder in vcenter as it already exists. Not sure why govc is giving that error as I think it is a red herring and really should say "folder already exists".

The problem is the if statement is wrong....

govc folder.info "$OM_VM_FOLDER" 2>&1 | grep "$OM_VM_FOLDER" | awk '{print $2}'
pcf_vms
/CloudFoundry/vm/pcf_vms

It returns two values, strip out the greps/awks and you can see why:

govc folder.info "$OM_VM_FOLDER"
Name:        pcf_vms
  Path:      /CloudFoundry/vm/pcf_vms
  Types:     Folder,VirtualMachine,VirtualApp
  Children:  15

So the comparator to != $OM_VM_FOLDER doesn't work.

@bmhkb4
Copy link
Author

bmhkb4 commented May 9, 2018

I just modified it to ignore all that logic about folder structure stuff and just import. This sucks because now I am drifting off the release even more (had to make a bunch of changes to add customization to ert pipeline too. =(

@calebwashburn
Copy link
Contributor

@bmhkb4 Can you provide the config for your govc variables in the pipeline? And assume the target folder is /CloudFoundry/vm/pcf_vms GOVC will go into an infinite loop if folder is not present hence the logic to add creating of the folder if not present. We are working to see if GOVC can handle this with a better response (like an error) but we don't control that component.

@calebwashburn calebwashburn reopened this May 18, 2018
@cf-gitbot
Copy link

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.

@bmhkb4
Copy link
Author

bmhkb4 commented May 18, 2018

OM_VM_FOLDER = pcf_vms

Which other variable do you need?

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

No branches or pull requests

4 participants