Skip to content
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

Initial implementation of AppManager #99

Merged
merged 42 commits into from
Nov 19, 2012
Merged

Conversation

nlake44
Copy link
Contributor

@nlake44 nlake44 commented Nov 14, 2012

Migrating the starting and stopping of applications out of the AppController to a new Python service, named the AppManager.

shatterednirvana and others added 30 commits October 30, 2012 11:27
bumped version number to 1.6.3
…h how the AppController sends them over, fixing issue AppScale#18
…xactly we get back from ifconfig to parse our IP from
… address in zookeeper, instead of trying to remove the whole directory
…a-fix

IaaS Manager Sources credentials properly
…ppcontroller-fix

Remove app via appcontroller fix
…tore, also refactored datastore and users code
…'t always resolve constant values in the code and will just hardcode them, it's too tedious to go through and replace all of these so I just did the major ones
Removed sisyphus from code base
Terminate AppServer when process is over soft memory cap
flexmock(appscale_info).should_receive('get_secret')\
.and_return(fake_secret)
cmd = app_manager_server.create_python_stop_cmd(port)
assert port in cmd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use self.assertEquals, which is the proper way to use Python unittest.

@nlake44
Copy link
Contributor Author

nlake44 commented Nov 16, 2012

I've created an issue for this
#120
It should be priority in our next sprint.

On Fri, Nov 16, 2012 at 9:36 AM, Chris Bunch notifications@github.comwrote:

Add a test suite runner, like we do for all the Ruby code.


Reply to this email directly or view it on GitHubhttps://github.com//pull/99#issuecomment-10454985.

Navraj Chohan (Raj)
PhD Candidate @ UC Santa Barbara
http://cs.ucsb.edu/~nchohan
http://appscale.cs.ucsb.edu
http://nlake44.posterous.com

@nlake44
Copy link
Contributor Author

nlake44 commented Nov 16, 2012

fixed. Was missing a mock. Will test on a local checkout to verify.

On Fri, Nov 16, 2012 at 9:38 AM, Chris Bunch notifications@github.comwrote:

Running unit tests for the AppManagerServer fails:

outer-haven:unit cgb$ python test_app_manager_server.py

...E.......E....

ERROR: test_create_java_stop_cmd (main.TestAppManager)

Traceback (most recent call last):
File "test_app_manager_server.py", line 98, in test_create_java_stop_cmd
cmd = app_manager_server.create_java_stop_cmd(port)
File "../../app_manager_server.py", line 441, in create_java_stop_cmd
"--address=" + appscale_info.get_private_ip(),
File "../../../lib/appscale_info.py", line 19, in get_private_ip
return file_io.read(constants.PRIVATE_IP_LOC).rstrip()
File "../../../lib/file_io.py", line 27, in read
FILE = open(file_name, READ_ONLY)
IOError: [Errno 2] No such file or directory: '/etc/appscale/my_private_ip'

ERROR: test_start_app_goodconfig (main.TestAppManager)

Traceback (most recent call last):
File "test_app_manager_server.py", line 55, in test_start_app_goodconfig
assert 12345 == app_manager_server.start_app(configuration)
File "../../app_manager_server.py", line 99, in start_app
config['dblocations'])
File "../../app_manager_server.py", line 365, in create_python_start_cmd
"-a " + appscale_info.get_private_ip()]
File "../../../lib/appscale_info.py", line 19, in get_private_ip
return file_io.read(constants.PRIVATE_IP_LOC).rstrip()
File "../../../lib/file_io.py", line 27, in read
FILE = open(file_name, READ_ONLY)
IOError: [Errno 2] No such file or directory: '/etc/appscale/my_private_ip'


Ran 14 tests in 0.011s

FAILED (errors=2)


Reply to this email directly or view it on GitHubhttps://github.com//pull/99#issuecomment-10455091.

Navraj Chohan (Raj)
PhD Candidate @ UC Santa Barbara
http://cs.ucsb.edu/~nchohan
http://appscale.cs.ucsb.edu
http://nlake44.posterous.com

@shatterednirvana
Copy link
Contributor

Looks great now. Can you do a merge with appscale/testing so that I can automatically merge this in?

@nlake44 nlake44 merged commit 2d717e3 into AppScale:testing Nov 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants