ironic node properties are unsorted

Bug #1507956 reported by Kyrylo Romanenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Status tracked in 10.0.x
10.0.x
Confirmed
Wishlist
MOS Ironic
9.x
Won't Fix
Wishlist
MOS Ironic

Bug Description

Ironic node properties are unsorted or sorted in some strange way:
http://paste.openstack.org/show/476824/

While properties of Glance images, Cinder volumes, Nova instances are sorted alphabetically.
This issue does not affect any functionality, this only question of convenience.

ironicclient 0.5.1

MOS VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  openstack_version: "2015.1.0-8.0"
  api: "1.0"
  build_number: "236"
  build_id: "2015-10-15_17-34-41"
  fuel-nailgun_sha: "ece438cbd9919c19469c14f707bd0a38c036fae7"
  python-fuelclient_sha: "655db5e96282bbafc4dae54462a01823b6b464cb"
  fuel-agent_sha: "5d2d5e2e9ad4f8bb01e450240d85447608d84b92"
  fuel-nailgun-agent_sha: "08e0a11cf1f29b705e4b910d9b9db5e9b708b6e3"
  astute_sha: "a090546d43c770ac27ca81c6f8c78ff0ba4a93e0"
  fuel-library_sha: "bf572ec8ea272bd02fcb86c2631b6acc8d10be3f"
  fuel-ostf_sha: "92afc66afc9d21341e8c220d1f80aa7945e6b2d0"
  fuel-createmirror_sha: "fe81731b76071dc0a4ffdf039080732243f5a871"
  fuelmain_sha: "9896d379981ea539ef834ce17f8f0f3a5e4a9e15"

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

This is probably Wishlist: properties are stored in a dictionary and order for keys is simply not defined.

Changed in mos:
status: New → Confirmed
importance: Low → Wishlist
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

Another thing I'm worried about is that dictionaries are displayed as Python literals:

{u'ssh_username': u'ironic', u'deploy_kernel': u'8730e575-e7bb-4273 |
| | -b19b-142ad63f4bd2', u'deploy_ramdisk': u'cf363dfe-ae04-4807-944e- |
| | c1cb450718cf', u'ssh_password': u'******', u'ssh_virt_type': u'virsh', |
| | u'ssh_address': u'172.18.170.7', u'deploy_squashfs': u'a8c97824-cbce- |
| | 4bb8-b5c5-500caa41c62a'}

rather than being properly printed to the standard output stream.

I think, this can break, if a non-ascii character is used in the properties names/values.

Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

^ "break" really means we'll see something like

In [3]: print repr(a)
u'\u043f\u0440\u0438\u0432\u0435\u0442'

instead of

In [2]: print a
привет

for a string:

In [0]: a = u'привет'

Changed in mos:
status: Confirmed → Won't Fix
Revision history for this message
Dina Belova (dbelova) wrote :

Added move-to-10.0 tag due to the fact bug was transferred from 9.0 to 10.0

tags: added: area-ironic move-to-10.0
removed: ironic
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.