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

Fixed bug to allow 'dcos task exec' to work with pods. #916

Merged
merged 1 commit into from
Feb 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 3 additions & 7 deletions dcos/mesos.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def _get_container_status(task):
def _get_container_id(container_status):
if 'container_id' in container_status:
if 'value' in container_status['container_id']:
return container_status['container_id']['value']
return container_status['container_id']

raise DCOSException(
"No container found for the specified task."
Expand Down Expand Up @@ -1206,9 +1206,7 @@ def _launch_nested_container_session(self):
'type': "LAUNCH_NESTED_CONTAINER_SESSION",
'launch_nested_container_session': {
'container_id': {
'parent': {
'value': self.parent_id
},
'parent': self.parent_id,
'value': self.container_id
},
'command': {
Expand Down Expand Up @@ -1289,9 +1287,7 @@ def _initial_input_streamer():
'attach_container_input': {
'type': 'CONTAINER_ID',
'container_id': {
'parent': {
'value': self.parent_id
},
'parent': self.parent_id,
'value': self.container_id}}}

yield self.encoder.encode(message)
Expand Down