-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'cf push myapp -i n' exit with code 0 before all instances up and running (v6.38) #1437
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/159722828 The labels on this github issue will be updated when the story is started. |
Hey there @shiyan0109! The intended behavior of this code is that it polls the CF API until any instance reports If you want to verify that multiple instances are running, you can always run From what we can tell from history - this code has not been modified for multiple released versions of the CF CLI, so this behavior is not new. We'd recommend adjusting your script to be aware of this possible situation as we are unlikely to change it. |
Thanks for reply, but is a little hard to explain. We had such error right after we upgraded version to 6.38, and the error went away once we downupgraded the version to v6.37 again. No change at all can result in such behavior? |
There are three pieces to the "error" that you're perceiving that should be pointed out and explained:
For 1 and 3, the code I pointed out above shows that that the CF CLI has always exhibited the "exit 0 when at least 1 instance is up" behavior. As for Point 2, these values for this display is obtained by various CC calls, depending on the timing of things, the state of any instance beyond the first What is new in |
Command
"cf push myapp -i 2"
What occurred
'Cf push ' command exit with 0 before both 2 of my requested instances started and running (only 1 has run)
“cf push mytestapp --no-manifest -p python.zip -i 2 -m 128M -k 256M -b python_buildpack
Pushing app mytestapp to org myorg / space dev as xxx...
Getting app info...
Creating app with these attributes...
path: /opt/python.zip
buildpacks:
routes:
Creating app mytestapp...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
0 B / 16.60 KiB 0.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00%
16.60 KiB / 16.60 KiB 100.00% 4s
Waiting for API to complete processing files...
Staging app and tracing logs...
Downloading python_buildpack...
Downloaded python_buildpack
Cell diego-cell-0 creating container for instance 0de0028f-35e2-43b1-a903-9f3db7546ebc
Cell diego-cell-0 successfully created container for instance 0de0028f-35e2-43b1-a903-9f3db7546ebc
Downloading app package...
Downloaded app package (16.6K)
-----> Python Buildpack version 1.6.11
-----> Supplying Python
-----> Installing python 2.7.14
Download [https://buildpacks.cloudfoundry.org/dependencies/python/python-2.7.14-linux-x64-30d9c08f.tgz]
-----> Installing setuptools 38.5.2
Download [https://buildpacks.cloudfoundry.org/dependencies/setuptools/setuptools-38.5.2-8246123e.zip]
-----> Installing pip 9.0.1
Download [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip/pip-9.0.1-35f01da3.tar.gz]
-----> Installing pip-pop 0.1.1
Download [https://buildpacks.cloudfoundry.org/dependencies/manual-binaries/pip-pop/pip-pop-0.1.1-d410583a.tar.gz]
-----> Installing pipenv 11.1.4
Download [https://buildpacks.cloudfoundry.org/dependencies/pipenv/pipenv-v11.1.4-7394418e.tgz]
-----> Running Pip Install
You must give at least one requirement to install (see "pip help install")
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Exit status 0
Uploading droplet, build artifacts cache...
Uploading build artifacts cache...
Uploading droplet...
Uploaded build artifacts cache (37.1M)
Uploaded droplet (39.9M)
Uploading complete
Cell diego-cell-0 stopping instance 0de0028f-35e2-43b1-a903-9f3db7546ebc
Cell diego-cell-0 destroying container for instance 0de0028f-35e2-43b1-a903-9f3db7546ebc
Cell diego-cell-0 successfully destroyed container for instance 0de0028f-35e2-43b1-a903-9f3db7546ebc
Waiting for app to start...
name: mytestapp
requested state: started
routes: mytestapp.
last uploaded: Mon 13 Aug 02:59:22 UTC 2018
stack: cflinuxfs2
buildpacks: python
type: web
instances: 1/2
memory usage: 128M
start command: python server.py
state since cpu memory disk
#0 starting 2018-08-13T02:59:44Z 0.0% 0 of 128M 0 of 256M
#1 running 2018-08-13T02:59:57Z 0.0% 0 of 128M 0 of 256M
Std Error:
Process Exit Value: 0
What you expected to occur
Before v6.38, the behavior is 'cf push' exit with code 0 only when both 2 of 2 instances has been up and running
CLI Version
6.38.0+7ddf0aadd.2018-08-07
CC API Endpoint Version
Cloudcontroller_api: v2.106.0
CF Trace
Platform & Shell Details
Ubuntu 16.06
Any other relevant information
The text was updated successfully, but these errors were encountered: