Adding vrrporch module #3315
Adding vrrporch module #3315
Build #20250509.11 had test failures
Details
- Failed: 878 (33.02%)
- Passed: 1,657 (62.32%)
- Other: 124 (4.66%)
- Total: 2,659
- 53152 of 70078 lines covered (75.85%)
Annotations
Check failure on line 2008622 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L2008622
Bash exited with code '123'.
Check failure on line 21 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L21
Path does not exist: /agent/_work/1/a/asan
Check failure on line 64 in Build log
azure-pipelines / Azure.sonic-swss
Build log #L64
Bash exited with code '1'.
Check failure on line 1 in test_PortChannelAfterAcl
azure-pipelines / Azure.sonic-swss
test_PortChannelAfterAcl
test setup failure
Raw output
self = <docker.api.client.APIClient object at 0x7f35e94d92b0>
response = <Response [404]>
def _raise_for_status(self, response):
"""Raises stored :class:`APIError`, if one occurred."""
try:
> response.raise_for_status()
/usr/local/lib/python3.8/dist-packages/docker/api/client.py:268:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [404]>
def raise_for_status(self):
"""Raises :class:`HTTPError`, if one occurred."""
http_error_msg = ""
if isinstance(self.reason, bytes):
# We attempt to decode utf-8 first because some servers
# choose to localize their reason strings. If the string
# isn't utf-8, we fall back to iso-8859-1 for all other
# encodings. (See PR #3538)
try:
reason = self.reason.decode("utf-8")
except UnicodeDecodeError:
reason = self.reason.decode("iso-8859-1")
else:
reason = self.reason
if 400 <= self.status_code < 500:
http_error_msg = (
f"{self.status_code} Client Error: {reason} for url: {self.url}"
)
elif 500 <= self.status_code < 600:
http_error_msg = (
f"{self.status_code} Server Error: {reason} for url: {self.url}"
)
if http_error_msg:
> raise HTTPError(http_error_msg, response=self)
E requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.49/containers/create
/usr/local/lib/python3.8/dist-packages/requests/models.py:1021: HTTPError
The above exception was the direct cause of the following exception:
self = <docker.models.containers.ContainerCollection object at 0x7f35e94d9700>
image = 'debian:jessie', command = 'bash', stdout = True, stderr = False
remove = False, kwargs = {'privileged': True, 'stdin_open': True}
stream = False, detach = True, platform = None
def run(self, image, command=None, stdout=True, stderr=False,
remove=False, **kwargs):
"""
Run a container. By default, it will wait for the container to finish
and return its logs, similar to ``docker run``.
If the ``detach`` argument is ``True``, it will start the container
and immediately return a :py:class:`Container` object, similar to
``docker run -d``.
Example:
Run a container and get its output:
>>> import docker
>>> client = docker.from_env()
>>> client.containers.run('alpine', 'echo hello world')
b'hello world\\n'
Run a container and detach:
>>> container = client.containers.run('bfirsh/reticulate-splines',
detach=True)
>>> container.logs()
'Reticulating spline 1...\\nReticulating spline 2...\\n'
Args:
image (str): The image to run.
command (str or list): The command to run in the container.
auto_remove (bool): enable auto-removal of the container on daemon
side when the container's process exits.
blkio_weight_device: Block IO weight (relative device weight) in
the form of: ``[{"Path": "device_path", "Weight": weight}]``.
blkio_weight: Block IO weight (relative weight), accepts a weight
value between 10 and 1000.
cap_add (list of str): Add kernel capabilities. For example,
``["SYS_ADMIN", "MKNOD"]``.
cap_drop (list of str): Drop kernel capabilities.
cgroup_parent (str): Override the default parent cgroup.
cgroupns (str): Override the default cgroup namespace mode for the
container. One of:
- ``private`` the container runs in its own private cgroup
Check failure on line 1 in test_PortChannelBeforeAcl
azure-pipelines / Azure.sonic-swss
test_PortChannelBeforeAcl
test setup failure
Raw output
self = <docker.api.client.APIClient object at 0x7f35e94d92b0>
response = <Response [404]>
def _raise_for_status(self, response):
"""Raises stored :class:`APIError`, if one occurred."""
try:
> response.raise_for_status()
/usr/local/lib/python3.8/dist-packages/docker/api/client.py:268:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [404]>
def raise_for_status(self):
"""Raises :class:`HTTPError`, if one occurred."""
http_error_msg = ""
if isinstance(self.reason, bytes):
# We attempt to decode utf-8 first because some servers
# choose to localize their reason strings. If the string
# isn't utf-8, we fall back to iso-8859-1 for all other
# encodings. (See PR #3538)
try:
reason = self.reason.decode("utf-8")
except UnicodeDecodeError:
reason = self.reason.decode("iso-8859-1")
else:
reason = self.reason
if 400 <= self.status_code < 500:
http_error_msg = (
f"{self.status_code} Client Error: {reason} for url: {self.url}"
)
elif 500 <= self.status_code < 600:
http_error_msg = (
f"{self.status_code} Server Error: {reason} for url: {self.url}"
)
if http_error_msg:
> raise HTTPError(http_error_msg, response=self)
E requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.49/containers/create
/usr/local/lib/python3.8/dist-packages/requests/models.py:1021: HTTPError
The above exception was the direct cause of the following exception:
self = <docker.models.containers.ContainerCollection object at 0x7f35e94d9700>
image = 'debian:jessie', command = 'bash', stdout = True, stderr = False
remove = False, kwargs = {'privileged': True, 'stdin_open': True}
stream = False, detach = True, platform = None
def run(self, image, command=None, stdout=True, stderr=False,
remove=False, **kwargs):
"""
Run a container. By default, it will wait for the container to finish
and return its logs, similar to ``docker run``.
If the ``detach`` argument is ``True``, it will start the container
and immediately return a :py:class:`Container` object, similar to
``docker run -d``.
Example:
Run a container and get its output:
>>> import docker
>>> client = docker.from_env()
>>> client.containers.run('alpine', 'echo hello world')
b'hello world\\n'
Run a container and detach:
>>> container = client.containers.run('bfirsh/reticulate-splines',
detach=True)
>>> container.logs()
'Reticulating spline 1...\\nReticulating spline 2...\\n'
Args:
image (str): The image to run.
command (str or list): The command to run in the container.
auto_remove (bool): enable auto-removal of the container on daemon
side when the container's process exits.
blkio_weight_device: Block IO weight (relative device weight) in
the form of: ``[{"Path": "device_path", "Weight": weight}]``.
blkio_weight: Block IO weight (relative weight), accepts a weight
value between 10 and 1000.
cap_add (list of str): Add kernel capabilities. For example,
``["SYS_ADMIN", "MKNOD"]``.
cap_drop (list of str): Drop kernel capabilities.
cgroup_parent (str): Override the default parent cgroup.
cgroupns (str): Override the default cgroup namespace mode for the
container. One of:
- ``private`` the container runs in its own private cgroup
Check failure on line 1 in test_AclOnPortChannelMember
azure-pipelines / Azure.sonic-swss
test_AclOnPortChannelMember
test setup failure
Raw output
self = <docker.api.client.APIClient object at 0x7f35e94d92b0>
response = <Response [404]>
def _raise_for_status(self, response):
"""Raises stored :class:`APIError`, if one occurred."""
try:
> response.raise_for_status()
/usr/local/lib/python3.8/dist-packages/docker/api/client.py:268:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Response [404]>
def raise_for_status(self):
"""Raises :class:`HTTPError`, if one occurred."""
http_error_msg = ""
if isinstance(self.reason, bytes):
# We attempt to decode utf-8 first because some servers
# choose to localize their reason strings. If the string
# isn't utf-8, we fall back to iso-8859-1 for all other
# encodings. (See PR #3538)
try:
reason = self.reason.decode("utf-8")
except UnicodeDecodeError:
reason = self.reason.decode("iso-8859-1")
else:
reason = self.reason
if 400 <= self.status_code < 500:
http_error_msg = (
f"{self.status_code} Client Error: {reason} for url: {self.url}"
)
elif 500 <= self.status_code < 600:
http_error_msg = (
f"{self.status_code} Server Error: {reason} for url: {self.url}"
)
if http_error_msg:
> raise HTTPError(http_error_msg, response=self)
E requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.49/containers/create
/usr/local/lib/python3.8/dist-packages/requests/models.py:1021: HTTPError
The above exception was the direct cause of the following exception:
self = <docker.models.containers.ContainerCollection object at 0x7f35e94d9700>
image = 'debian:jessie', command = 'bash', stdout = True, stderr = False
remove = False, kwargs = {'privileged': True, 'stdin_open': True}
stream = False, detach = True, platform = None
def run(self, image, command=None, stdout=True, stderr=False,
remove=False, **kwargs):
"""
Run a container. By default, it will wait for the container to finish
and return its logs, similar to ``docker run``.
If the ``detach`` argument is ``True``, it will start the container
and immediately return a :py:class:`Container` object, similar to
``docker run -d``.
Example:
Run a container and get its output:
>>> import docker
>>> client = docker.from_env()
>>> client.containers.run('alpine', 'echo hello world')
b'hello world\\n'
Run a container and detach:
>>> container = client.containers.run('bfirsh/reticulate-splines',
detach=True)
>>> container.logs()
'Reticulating spline 1...\\nReticulating spline 2...\\n'
Args:
image (str): The image to run.
command (str or list): The command to run in the container.
auto_remove (bool): enable auto-removal of the container on daemon
side when the container's process exits.
blkio_weight_device: Block IO weight (relative device weight) in
the form of: ``[{"Path": "device_path", "Weight": weight}]``.
blkio_weight: Block IO weight (relative weight), accepts a weight
value between 10 and 1000.
cap_add (list of str): Add kernel capabilities. For example,
``["SYS_ADMIN", "MKNOD"]``.
cap_drop (list of str): Drop kernel capabilities.
cgroup_parent (str): Override the default parent cgroup.
cgroupns (str): Override the default cgroup namespace mode for the
container. One of:
- ``private`` the container runs in its own private cgroup
Check failure on line 1 in test_nonflaky_dummy
azure-pipelines / Azure.sonic-swss
test_nonflaky_dummy
test teardown failure
Raw output
tp = <class 'AttributeError'>, value = None, tb = None
def reraise(tp, value, tb=None):
try:
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
> raise value
/usr/lib/python3/dist-packages/six.py:703:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/six.py:703: in reraise
raise value
/usr/lib/python3/dist-packages/six.py:703: in reraise
raise value
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
request = <SubRequest 'manage_dvs' for <Function test_PortChannelAfterAcl>>
@pytest.fixture(scope="session")
def manage_dvs(request) -> str:
"""
Main fixture to manage the lifecycle of the DVS (Docker Virtual Switch) for testing
Returns:
(func) update_dvs function which can be called on a per-module basis
to handle re-creating the DVS if necessary
"""
if sys.version_info[0] < 3:
raise NameError("Python 2 is not supported, please install python 3")
if subprocess.check_call(["/sbin/modprobe", "team"]):
raise NameError("Cannot install kernel team module, please install a generic kernel")
name = request.config.getoption("--dvsname")
using_persistent_dvs = name is not None
forcedvs = request.config.getoption("--forcedvs")
keeptb = request.config.getoption("--keeptb")
imgname = request.config.getoption("--imgname")
max_cpu = request.config.getoption("--max_cpu")
buffer_model = request.config.getoption("--buffer_model")
force_recreate = request.config.getoption("--force-recreate-dvs")
graceful_stop = request.config.getoption("--graceful-stop")
enable_coverage = request.config.getoption("--enable-coverage")
dvs = None
curr_dvs_env = [] # lgtm[py/unused-local-variable]
if using_persistent_dvs and force_recreate:
pytest.fail("Options --dvsname and --force-recreate-dvs are mutually exclusive")
def update_dvs(log_path, new_dvs_env=[]):
"""
Decides whether or not to create a new DVS
Create a new the DVS in the following cases:
1. CLI option `--force-recreate-dvs` was specified (recreate for every module)
2. The dvs_env has changed (this can only be set at container creation,
so it is necessary to spin up a new DVS)
3. No DVS currently exists (i.e. first time startup)
Otherwise, restart the existing DVS (to get to a clean state)
Returns:
(DockerVirtualSwitch) a DVS object
"""
nonlocal curr_dvs_env, dvs
if force_recreate or \
new_dvs_env != curr_dvs_env or \
dvs is None:
if dvs is not None:
dvs.get_logs()
dvs.destroy()
dvs = DockerVirtualSwitch(name, imgname, keeptb, new_dvs_env, log_path, max_cpu, forcedvs, buffer_model = buffer_model, enable_coverage=enable_coverage)
curr_dvs_env = new_dvs_env
else:
# First generate GCDA files for GCov
dvs.runcmd('killall5 -15')
# If not re-creating the DVS, restart container
# between modules to ensure a consistent start state
dvs.net_cleanup()
dvs.destroy_servers()
dvs.create_servers()
dvs.restart()
return dvs
yield update_dvs
if graceful_stop:
> dvs.stop_swss()
E AttributeError: 'NoneType' object has no attribute 'stop_swss'
conftest.py:1900: AttributeError