Skip to content
Snippets Groups Projects
  1. Apr 25, 2018
    • Julien Danjou's avatar
      indexer: drop/create missing constraint in slash reencoding migration script · bfcfd36e
      Julien Danjou authored
      The current script cannot be executed if a resource has an history entry:
      
      ERROR gnocchi oslo_db.exception.DBReferenceError: (psycopg2.IntegrityError) update or delete on table "resource" violates foreign key constraint "fk_rh_id_resource_id" on table "resource_history"
      DEBUG [pifpaf.drivers] gnocchi-upgrade[71041] output: 2018-04-24 09:36:08.029 71041 ERROR gnocchi DETAIL:  Key (id)=(e8bce9ff-5c30-524c-87b8-bfb1dce7855b) is still referenced from table "resource_history".
      DEBUG [pifpaf.drivers] gnocchi-upgrade[71041] output: 2018-04-24 09:36:08.029 71041 ERROR gnocchi  [SQL: 'UPDATE resource SET id=%(param_1)s, original_resource_id=%(original_resource_id)s WHERE resource.id = %(id_1)s'] [parameters: {'param_1': 'bd6eac67-c1e9-5da0-9979-a797d776039e', 'original_resource_id': 'historized_resource', 'id_1': UUID('e8bce9ff-5c30-524c-87b8-bfb1dce7855b')}] (Background on this error at: http://sqlalche.me/e/gkpj)
      
      This drops and recreates the constraint at the end of the migration.
      bfcfd36e
  2. Mar 06, 2018
    • Mehdi Abaakouk's avatar
      Move out from pbr · 3f8a22a5
      Mehdi Abaakouk authored
      All pbr interesting features (the seutp.cfg) have been implemented in
      setuptools since version 30.3.0 (8 Dec 2016).
      Also pbr will break us soon and force us to found a new solution
      to generate things during setup.py steps.
      https://github.com/gnocchixyz/gnocchi/issues/755
      
      When you use pbr you cannot override most of the cmdclass. So we cannot
      make our hooks working anymore.
      
      Generation of ChangeLog and AUTHORS are done during egg_info.
      gnocchi-api script is created on the fly with the right python header
      
      Package file listing and package version is done by the pypa maintained
      setuptools_scm.
      
      This may impact downstream packaging as setuptools versions are a bit
      old:
      * xenial: 20.7
      * zesty: 33.1.1
      * centos7/rhel7: 0.9.8 ... really ?
      * rdo queen: 22.0
      * rdo rocky plan to 38.6
      
      Closes-bug: #755
      3f8a22a5
  3. Jan 04, 2018
    • Julien Danjou's avatar
      storage: truncate aggregated time series before storing · 4211952e
      Julien Danjou authored
      The current truncation code in AggregatedTimeSerie truncate on object
      initialize only. That means that split up to POINTS_PER_SPLIT points are
      stored, and that data is read and _truncated_ at this point.
      
      When new points are added (existing merge), it's possible that the number of
      points grows more than the number of points defined by the archive policy,
      storing too many points. That's hidden because when re-read, the
      AggregatedTimeSerie is truncated again.
      
      However, that makes the storage driver store too much data.
      
      This patches remove the max_size attribute from carbonara.AggregatedTimeSerie
      and simply expose a truncate() method that can be used to truncate each split
      based on the oldest point that is defined by the archive policy.
      4211952e
  4. Jun 09, 2017
    • Julien Danjou's avatar
      tests: speed-up data generation · 64e9f56c
      Julien Danjou authored
      Calling 28800 times `date' is pretty slow. Let's generate that data in a snap
      using Python.
      
      This makes the job twice faster on my laptop.
      64e9f56c
  5. Mar 07, 2017
  6. Feb 11, 2017
  7. Jan 31, 2017
    • Julien Danjou's avatar
      rest: string → UUID conversion for resource.id to be unique per user · ad4b851c
      Julien Danjou authored
      This changes the UUID5 based mechanism so it depends on the user trying
      to CRUD the resource. This makes sure that when using this kind of
      transformation, the resource id is converted to a unique id for the
      user, while preventing conflicting if every user wants to create a
      "foobar" resource.
      
      Change-Id: Iebaf3b9f8e0a198af0156008710e0c1253dc5f9d
      Closes-Bug: #1617918
      ad4b851c
    • Julien Danjou's avatar
      tests: specify columns to compare in resource list · 34b7d303
      Julien Danjou authored
      gnocchiclient 3.0.0 changed and changes dynamically the column names
      (created_by_* is now creator with Gnocchi >= 3.1) so list the column we need to
      compare explicitly.
      
      Change-Id: I44c8c519823d0a85c54390fd4faf8bde40931989
      34b7d303
  8. Jan 27, 2017
  9. Jan 26, 2017
  10. Jan 25, 2017
    • Julien Danjou's avatar
      tests: clean upgrade variable · 05ad5486
      Julien Danjou authored
      These variable are actually overwritten by pifpaf (currently). As pifpaf will
      likely remove these variable in the future (since the default is now basic),
      let's set them and use the actually defined value by pifpaf.
      
      Change-Id: I9f157e9c74377091747b5ae699048e84ca1283c6
      05ad5486
  11. Jan 18, 2017
  12. Jan 16, 2017
    • Mehdi Abaakouk's avatar
      rest: reject / as resource id and metric name · fece4291
      Mehdi Abaakouk authored
      This change reject with a 400 error any resource id or metric name
      with a '/'.
      
      Existing metric/resource are update to replace the '/' by a '_'.
      
      Change-Id: I7fb97b5439119ad74035003c66c2d62272f7097f
      fece4291
    • Mehdi Abaakouk's avatar
      tests: Fix upgrade script · b0b8c1ae
      Mehdi Abaakouk authored
      Currently the upgrade tests create only one resource instead
      of four.
      
      This change fixes that.
      
      Change-Id: I6c4ec1365228b1e092328ef1732f07b770e70c74
      b0b8c1ae
  13. Jan 15, 2017
  14. Jan 13, 2017
  15. Sep 30, 2016
    • Mehdi Abaakouk's avatar
      upgrade tests: don't patch gnocchi 3.0 · 0a06089b
      Mehdi Abaakouk authored
      The upgrade tests was patching gnocchi 2.2 with a patch not yet release
      on that branch.
      
      This is not needed when Gnocchi version is not 2.2.0. So this change
      applies the patch only on Gnocchi 2.2.0.
      
      Change-Id: I33ceb9ec06bf10ac896d037b7a76f6296f9e5a09
      0a06089b
  16. Sep 22, 2016
    • Mehdi Abaakouk's avatar
      Add simple upgrade tests · bd142765
      Mehdi Abaakouk authored
      This change adds a tox targets that run upgrade testing.
      
      The two jobs have been chosen for gate testing, but other
      can be later added for local testing.
      
      Change-Id: I7d06847243fd3be4e8cd381205d6c21bcd087f30
      bd142765
Loading