- Add new standalone framework that supports any runtime
- Allow a framework to not have a default runtime
- Allow sending a start command on app create/update
- Fix cc staging json parsing issue to allow quotes
in start command (EM.system strips escaped backslashes)
- Do not assign a web port if no URLs specified
- Confirm app is started by PID if no web port assigned
Change-Id: Ib4e51abf2495ff72dd586727bae85c0997bac28e
Ruby is no longer in the default search path when running inside
a container. To further complicate matters, the DEA starts apps
with 'env -i' preventing it from being added to the environment
when the DEA is started.
Change-Id: I15d2b62a9e26afadb77a926ea00a391f57b33550
- Removed the logic in agent that uses a file to decide if an app is started
(instead, we use Tomcat7's mechanism that doesn't bind to port until the
app is started). This makes Java web apps no different than other apps
- Update code to generate server.xml such that the bindOnInit attribute is
set to false (thus making it wait until the app is ready to bind to the port)
and remove flags that no longer apply to Tomcat7
Change-Id: If00f30dd636cf50df76fbc3cc99ba3eecb464531
This is a follow-up to Change Ie3d7f772 , We preserve HOME environment
varialbe in both version check and additional version checking.
Test plans:
- Unit tests pass
- BVT pass on dev_setup
- BVT pass on dev instance
Next step: We shouldn't need the additional check, remove this
duplicate.
Change-Id: I3f44a8aa7893ff6bb7a19a7c6855b4d14843bdf5
I don't understand why Erlang insists on HOME env var being set.
Anyway this accomodates that erlexec quirk when validating runtimes.
Change-Id: Ie3d7f772cb6fa2ed2f8b05a8f854009d871ce24f
Update example yaml configs to reference Python 2.6 runtime as python2
lieu of Changes I9d5a37af and I513499da. This is more of a documentation
update as these configs are not used by deployed applications.
Test plan: passed unit tests
Change-Id: Id185299b13dbbb1fdfd4cc3fc67b07b334051798
The functional tests in ruby assumes that /usr/bin/ruby is ruby1.8
which is bad and fails in new CI environment where this executable
doesn't exist. This change assumes /usr/bin/ruby1.8 is ruby1.8, which is
just as bad.
Next step: only use hardcoded path as fallback and detect some
external configs such as file or env vars.
Test plan: pass unit and functional tests, make CI happy with DEA
specs.
Change-Id: Ic26d213c3c52b1a5fb00ee43c70530484a240dbe
yes.. I was burned by this. my / mount point is 98% full and
the default value caused the unit tests to fail
Change-Id: I7cbfc8f74967ae196ac9f847514b78c50a376088
Purpose:
Replaces discover message and tainting approach in current
implementation. New approach is less sensitive to network
latency fluctuations, thus predictably ensures random app
placement.
DEA:
-dea periodically broadcasts (default: 5 seconds) its relavent placement
stats on dea.advertise.
-dea also sends new advertisements when resources are provisioned (e.g. at
app start) or free'd (at droplet cleanup).
-dea now listens on dea.locate, will response on dea.advertise with its
stats (id, available_memory, runtimes).
CC:
-new placement protocol can be optionally enabled with
new_initial_placement: field in cloudcontroller.yml (off by default).
-DEAPool keeps a hash of available DEA's based on messages from
dea.advertise.
-CC subscribes to dea.advertise then publishes a dea.locate message
on startup to initially populate DEAPool's hash.
-DEAPool.find_dea(app) returns a random DEA with sufficient memory and
runtime support from this list, replaces find_dea_for method in
app_manager that relied on use of discover messages.
-DEAPool.find_dea will prune out of date entries from the DEA hash, i.e.
if an DEA's entry is greater than 10 seconds old (2x the advertise
period).
Change-Id: I8c1537103e63eb3b42b22f61ac278eba4c8eef61
This addresses a bug introduced by Eduardo Aceituno in commit
2b56b7f1e4 .
- Correct order of pid in su command
- Less unreadable command substitution
- Log the droplet instance state to confirm that we are killing
slow-starting crashed apps
- Run runtime check in clean environment
Change-Id: I2c2f5faa969b8e7ccc8e639173e6c2bbefb8b369
Previously, the DEA would continue to respond and attempt to fulfill discover/start
requests even if no disk space was available. We track usage for the filesystem
that houses the droplet directory and refuse to respond to said messages if usage
is too high.
Test plan:
- BVTs pass
- Deployed to my dev instance, filled the droplet dir to > 95%, and verified that the
DEA didn't respond to start/discover requests. Tested both with an actively running
DEA (to exercise the timer code path) and with a DEA that was just starting up.
Change-Id: Id0817bdccddd932e98eb76eba98a04e6ab14acd1
This allows the dea to be started with a high priority and not
have that priority inherited by the applications that it starts.
Test plan:
- BVTs pass
- Checked that when started with a high priority, apps have a
nice value of 0.
Change-Id: Ide3abc0105c6389c6df890a80491caf0ec4df605
Bundler (1.1.rc.5) leaks the following into my environment:
RUBYOPT=-I/home/mpage/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/bundler-1.1.rc.5/lib -rbundler/setup
This causes the version detection command used during tests ('/usr/bin/ruby -v') to try to
require the gems in the DEA's bundle. This will fail if the version of ruby used when running
the DEA is different from /usr/bin/ruby.
Change-Id: I10fff86fad90cb3136e1ba088f9432cb14b97046
This was done to support pull request
https://github.com/cloudfoundry/vcap/pull/100
That request wasn't pulled for other reasons,
but when it gets resubmitted, it can drop
into the DEA#grab_port method
Change-Id: I1a230fffd5ff5ec177e9e97f2a31cb4c6cb4013a
* stop requring it via :path ../common
* includes a dependency on em.0.12.11.cf.3 with a fixed up
gemspec to avoid the syck::defaultkey issue.
* bump staging and stager gems after taking new dependencies
* lock 3rd party gems to minor versions in the Gemfiles
Change-Id: I92648154036f8771400578a2ac14904c2c179d6c
If the ENV variable CLOUD_FOUNDRY_CONFIG_PATH is defined, config files are
picked up from that location. This allows components installed by the chef scripts to be
run by hand. i.e. without using the wrapper vcap/dev_setup/bin/vcap_dev <start/stop>
Change-Id: Ib6c971c6642bcb3b24186169e1c768ee70ba8d7b