-
Notifications
You must be signed in to change notification settings - Fork 710
Expanding the manifest capabilities #2952
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
base: master
Are you sure you want to change the base?
Conversation
68e11a4
to
6ce9955
Compare
26ff973
to
34eea1c
Compare
364f639
to
ef40341
Compare
this is adding new manifest for 3rd container management, can you update the doc? and provide link to the doc update pr? |
@lguohan, I will add a documentation once the another PR is also approved: sonic-net/sonic-buildimage#16248 |
@lguohan, I added the documentation PR: sonic-net/SONiC#1601 |
run_opt.append(f'--net={docker_network_type}') | ||
else: | ||
if container_spec['network']: | ||
raise ServiceCreatorError(f"Invalid Configuration, asic-service must not contain network type") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But ASIC services should not have network specified. This comment was given by the NVIDIA SONiC team. I am missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe none
? ref: https://docs.docker.com/engine/network/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you suggest? to enforce the none
as the docker_network_type like this
run_opt.append(f'--net=none')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, let me clarify:
- container_spec['network'] should have default value
bridge
. ie. if it is None, treat it asbridge
. - I do not propose to append run_opt, always respect user config
- if is_asic_service and container_spec['network'] != none, you can raise an exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, but this is what I do in this if and else that i added.
for point 3, if the container_spec['network'] is None I raise exception, am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting to do explicitly container_spec['network'] != 'none'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Please resolve conflict |
ports forwarding as well as docker network type configuration
ef40341
to
51479cb
Compare
Expand docker manifest capabilities
What I did
Expanding the manifest.json file to include new network capabilities including the
ports forwarding and docker network type configuration: host, bridge, etc.
How I did it
updating the manifest py file as well as the service_creatore py file.
How to verify it
In order to verify this feature, we need to have the complementary part in the sonic-buildimage repo
and then need to install a docker image file with manifest that includes ports in it and network type as well using sonic-package-manager and validate that they are as expected using docker commands such as: 'docker ps' and 'docker inspect' commands