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

Debug dump utility dash objects update #19440

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
5 changes: 5 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,12 @@ sudo cp {{platform_api_py3_wheel_path}} $FILESYSTEM_ROOT/$SONIC_PLATFORM_PY3_WHE
sudo https_proxy=$https_proxy LANG=C chroot $FILESYSTEM_ROOT pip3 install $SONIC_PLATFORM_PY3_WHEEL_NAME
sudo rm -rf $FILESYSTEM_ROOT/$SONIC_PLATFORM_PY3_WHEEL_NAME


sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/libdashapi_*.deb || \
Copy link
Collaborator

@qiluo-msft qiluo-msft Oct 2, 2024

Choose a reason for hiding this comment

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

If this is sonic-utilities's dependency, you do not need to install it explicitly. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is sonic-utilities dependency, but the libdashapi debian package is not implicitly installed by specifying just the sonic-utilities dependency,

admin@r-ocelot-07:~$ dump state --show
Traceback (most recent call last):
  File "/usr/local/bin/dump", line 5, in <module>
    from dump.main import dump
  File "/usr/local/lib/python3.11/dist-packages/dump/main.py", line 9, in <module>
    from dump.match_infra import RedisSource, JsonSource, MatchEngine, CONN
  File "/usr/local/lib/python3.11/dist-packages/dump/match_infra.py", line 10, in <module>
    from dump.dash_util import get_decoded_value
  File "/usr/local/lib/python3.11/dist-packages/dump/dash_util.py", line 6, in <module>
    from dash_api.types_pb2 import Guid, IpAddress, IpPrefix
ModuleNotFoundError: No module named 'dash_api'

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then something is missing to achieve implicitly install of dependency. Could you check why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the DEBS_DEPENDS packages are not automatically installled in the target image, for example:
In sonic-yang-models-py3.mk the py3 whl is dependent on LIBYANG. But this deb package is also explicitly installed along with the .whl in sonic_debian_extension.j2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@qiluo-msft Created a new issue as previously discussed (The .deb is not installed automatically when *.whl is installed) #20742 regarding the issue specified

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install xmlstarlet

{% endif %}

{%- if SONIC_ROUTING_STACK == "frr" %}
Expand Down
3 changes: 3 additions & 0 deletions rules/sonic-utilities.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ $(SONIC_UTILITIES_PY3)_DEBS_DEPENDS = $(LIBYANG) \
$(LIBYANG_PY3) \
$(LIBSWSSCOMMON) \
$(PYTHON3_SWSSCOMMON)
ifeq ($(CONFIGURED_PLATFORM),nvidia-bluefield)
$(SONIC_UTILITIES_PY3)_DEBS_DEPENDS += $(LIB_SONIC_DASH_API)
endif
SONIC_PYTHON_WHEELS += $(SONIC_UTILITIES_PY3)
Loading