/usr/libexec/os-refresh-config/configure.d/40-hiera-datafiles converts large numbers wrongly

Bug #1755236 reported by Michele Baldessari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Incomplete
Wishlist
Unassigned

Bug Description

Given a mapped_data extraconfig like this one:
   "extraconfig": {
    "mapped_data": {
     "rabbitmq_config_variables": {
      "queue_master_locator": "<<\"min-masters\">>",
      "loopback_users": [],
      "vm_memory_high_watermark": 0.5,
      "rates_mode": "detailed",
      "stats_event_max_backlog": 250,
      "tcp_listen_options": "[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]",
      "disk_free_limit": 2000000000,
      "cluster_partition_handling": "pause_minority",
      "collect_statistics_interval": 30000
     },

The 40-hiera-datafiles script will convert the large integer 'disk_free_limit' like this:
rabbitmq_config_variables: {
  "collect_statistics_interval": 30000,
  "queue_master_locator": "<<\"min-masters\">>",
  "loopback_users": [],
  "vm_memory_high_watermark": 0.5,
  "rates_mode": "detailed",
  "stats_event_max_backlog": 250,
  "tcp_listen_options": "[binary, {packet, raw}, {reuseaddr, true}, {backlog, 128}, {nodelay, true}, {exit_on_close, false}, {keepalive, true}]",
  "disk_free_limit": 2e+09,
  "cluster_partition_handling": "pause_minority"
}

Which will break the rabbitmq service as it cannot parse '2e+09'. This was first observed on newton

Revision history for this message
Michele Baldessari (michele) wrote :

Quoting the large number fixes it

Revision history for this message
Michele Baldessari (michele) wrote :

Ok so this is a jq bug:
# echo '{"id" : 1241000000}' | jq '.'
{
  "id": 1.241e+09
}

See also the following issues:
https://github.com/stedolan/jq/issues/218
https://github.com/stedolan/jq/issues/627
https://github.com/stedolan/jq/issues/178
https://github.com/stedolan/jq/issues/143

It does not seem that this will be fixed anytime soon

Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Changed in tripleo:
milestone: stein-3 → stein-rc1
Changed in tripleo:
milestone: stein-rc1 → train-1
Changed in tripleo:
milestone: train-1 → train-2
Revision history for this message
Luke Short (ekultails) wrote :

The JSON Query (jq) bug is still present and outside of TripleO's control.

https://github.com/stedolan/jq/issues/218

Changed in tripleo:
milestone: train-2 → train-3
Changed in tripleo:
milestone: train-3 → ussuri-1
Changed in tripleo:
milestone: ussuri-1 → ussuri-2
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
wes hayutin (weshayutin)
Changed in tripleo:
status: Triaged → Incomplete
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-3 → ussuri-rc3
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-rc3 → victoria-1
Changed in tripleo:
milestone: victoria-1 → victoria-3
Changed in tripleo:
importance: High → Wishlist
Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Revision history for this message
Marios Andreou (marios-b) wrote :

This is an automated action. Bug status has been set to 'Incomplete' and target milestone has been removed due to inactivity. If you disagree please re-set these values and reach out to us on freenode #tripleo

Changed in tripleo:
milestone: wallaby-3 → none
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.