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

Execution of "./bin/build" finishes but no "ova" file has been generated. #229

Closed
ivandavidov opened this issue May 1, 2017 · 9 comments
Labels

Comments

@ivandavidov
Copy link

I decided to generate my own pcf-dev ova for no particular reason (I am developer and I am experimenting) and I followed the instructions provided here. I installed all dependencies and after that I executed the following command from the repo's root folder:

./bin/build -only=virtualbox-iso

Unfortunately, in the very end of the process I was surprised with the following message:

==> Builds finished but no artifacts were created.

I reverse engineered the build execution and I found out that this message is produced when the following command has been executed from within the output directory:

packer build -only=virtualbox-iso -var 'distro=oss' -var 'source_ami=ami-564cca40' -var 'source_ova_path=/home/ivan/projects/pcfdev/pcfdev-base/pcfdev-base.ova' /home/ivan/projects/pcfdev/pcfdev.json

I tried to to enable the -debug option (as mention ind the comments in the development readme document) but the only message that I got in addition is this:

ivan@ubuntu:~/projects/pcfdev/output$ packer build -only=virtualbox-iso -debug -var 'distro=oss' -var 'source_ami=ami-564cca40' -var 'source_ova_path=/home/ivan/projects/pcfdev/pcfdev-base/pcfdev-base.ova' /home/ivan/projects/pcfdev/pcfdev.json
Debug mode enabled. Builds will not be parallelized.

==> Builds finished but no artifacts were created.
ivan@ubuntu:~/projects/pcfdev/output$ 

I believe all my output artifacts have been downloaded/generated successfully since there were no other error messages and the build script didn't exit (due to set -e), which means that all commands exited with 0 status, including the last packer command.

I googled the message and found out that this issue happens when there are errors during the ova generation process but I didn't see any error messages, nor the -debug option shows any useful logs (see above). In fact the packer command exits very fast (less than one second) which makes me think there is no attempt whatsoever to generate ova file which should be several GB in size and therefore the actual "packaging" should take considerable time.

My questions:

  • Am I missing something? Are there additional dependencies that I need to satisfy? I am using VirtualBox 5.0.36 on Ubuntu 16.04 with N3700 CPU and 5G RAM, and prior to running the build script I installed the dependencies described in the development readme document.
  • How/where can I check the output from the command/executable which is used in order to generate the ova file?

Thank you!

@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.

@ivandavidov
Copy link
Author

Here is a gist with strace of the packer command execution.

@ivandavidov
Copy link
Author

Here is another gist which shows the execution of the packer command. Note that I removed the -only argument in order to force the execution.

Nevertheless, I'm still not able to produce new ova file. Any suggestions?

Regards,
Ivan Davidov

@sclevine
Copy link
Contributor

Hi @ivandavidov,

Sorry for the delayed response. Those instructions are outdated. The argument should be:
-only=virtualbox-ovf

@ivandavidov
Copy link
Author

ivandavidov commented May 13, 2017

Thank you! I was able to produce the ova package but when I issued the command cf dev import ~/my/generated/pcfdev.ova I got the following error message:

Error: specified OVA version does not match the expected OVA version (0.461.0) for this version of the cf CLI plugin."

I found only one useful reference for this error message here but this didn't help me understand the actual root cause for the issue.

I unpacked the ova file and noticed that the ovf manifest has been generated with version 0 and all internal references in the XML also contain the same 0 version identifier.

I guess the version should come from one of the pcfdev*.json files or (better) specify it as argument to the packer command. I haven't tried this approach because the whole build process takes several hours on my machine.

I edited the ovf manually and changed all version occurrences (along with corresponding file rename operations in order to preserve consistency) and then manually repacked the ova (simple tar operation). Nevertheless, in the end I still got the same error message.

Could you please work on improving the development documentation? I understand this is not a high priority task at the moment but having proper development documentation will have huge positive impact on the developers who are currently trying to build their own versions of PCF Dev.

Regards,
Ivan Davidov

@sclevine
Copy link
Contributor

Hi @ivandavidov,

Use cf dev start -o /path/to/file.ova to start it. cf dev import only works with the version that the PCF Dev plugin was built for. More documentation about the CLI plugin lives here: https://github.com/pivotal-cf/pcfdev-cli

Happy to accept a PR with the docs changes you needed to get this working. Otherwise, we'll get around to improving the developer documentation when we are able.

@ivandavidov
Copy link
Author

Well, the -o option is not documented when you issue cf dev help which is causing some confusion and I decided to go with the documented approach. I was able to run my locally generated ova but I noticed that the apps manager is not available when I try to access https://local.pxfdev.io (certificate import works fine, then I get error "404 route not available", or something similar). The good news is that cf login works perfectly fine, no issues here.

I will do some more experiments, most probably during the weekend and I'll submit PR with the updated development documentation. I'm leaving the issue open for now.

Meanwhile - I already signed the individual contributor license agreement and I guess this one is different from the license agreement which is necessary in order to be able to contribute to the projects in Cloud Foundry Foundation. Is my assumption correct?

@ivandavidov
Copy link
Author

You can find my proposal regarding the development documentation changes in pull request #235.

Regards,
Ivan Davidov

@sclevine
Copy link
Contributor

Thanks, closing this issue in favor of that PR.

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

No branches or pull requests

3 participants