Expanding the manifest capabilities #2952
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.
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.
Maybe none? ref: https://docs.docker.com/engine/network/
There was a problem hiding this comment.
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.
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.
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.
Are you suggesting to do explicitly container_spec['network'] != 'none'?
|
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