SM API needs to encode/decode when communicate with SM

Bug #1976515 reported by Bin Qian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Bin Qian

Bug Description

SM API communicate to SM via socket. In python2 the str is automatically encoded to/decoded from ascii. Python3 requires explicitly encode/decode. This fails the communication between SM API and SM.

step to reporduce
-----------------
install a Debian StarlingX, try to unlock controller-1

Expected Behavior
-----------------
host unlocked

Actual Behavior
-----------------
Nothing happens, mtcAgent log 500 error from SM API request

Tags: stx.7.0 stx.ha
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ha (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/ha/+/844302

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ha (master)

Change abandoned by "Bin Qian <email address hidden>" on branch: master
Review: https://review.opendev.org/c/starlingx/ha/+/844302
Reason: A review is already posted https://review.opendev.org/c/starlingx/ha/+/844052

Revision history for this message
Al Bailey (albailey1974) wrote :
Revision history for this message
Bin Qian (bqian20) wrote :
Changed in starlingx:
status: In Progress → Invalid
Changed in starlingx:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ha (master)

Reviewed: https://review.opendev.org/c/starlingx/ha/+/844052
Committed: https://opendev.org/starlingx/ha/commit/924c088f3adc0ffc95ec14ad62ac742c7c78572f
Submitter: "Zuul (22348)"
Branch: master

commit 924c088f3adc0ffc95ec14ad62ac742c7c78572f
Author: Dan Voiculeasa <email address hidden>
Date: Tue May 31 16:14:06 2022 +0300

    py3: Fix sm-api communication

    mtcAgent get response code 500 from sm-api.

    Tests on AIO-DX:
    CentOS:
    PASS: unlocked enabled available controller-1
    Debian:
    integration not far enough to test controller-1 unlock
    PASS: mtcAgent gets a proper response from sm-api

    Story: 2009968
    Task: 45504
    Closes-Bug: 1976515
    Signed-off-by: Dan Voiculeasa <email address hidden>
    Change-Id: I5912f8d506d220775e2346f4b8771758cf818e3c

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
assignee: nobody → Bin Qian (bqian20)
tags: added: stx.7.0 stx.ha
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.