1. 19 Mar, 2018 2 commits
    • Alain Takoudjou's avatar
      62627b23
    • Alain Takoudjou's avatar
      grid.promise: implement a new promise launcher in slapgrid · f7eadb26
      Alain Takoudjou authored
      python promises can define sense, test and anomaly method.
      test method will be called by slapgrid or when no bang is needed for the promise anomaly method is
      called when a promise failure required to bang the master, anomaly method can be optional but it's not the case for test method.
      
      Slapgrid always run promises and save the result in .slapgrid/promise/result in a JSON format. The result will be used later by monitor
      When a partition is correctly deployed, slapgrid will only run promise anomaly and will bang if there is an error and if the failed promise can bang
      
      check promise anomaly when partition is upto date
      f7eadb26
  2. 07 Mar, 2018 4 commits
  3. 30 Jan, 2018 1 commit
  4. 12 Jan, 2018 1 commit
    • Alain Takoudjou's avatar
      Move slapgrid checkpromise method to utils so it can be reused · c49161fb
      Alain Takoudjou authored
      rename checkPromises to checkPromiseList, and move the method to grid/utils so it can be imported by monitor to check promises.
      
      
      `raise_on_failure` will be used to check all promises without raise. All promises result will be returned.
      
      `profile` True/False will log promise execution time.
      
      /reviewed-on !35
      c49161fb
  5. 26 Sep, 2017 1 commit
  6. 20 Sep, 2017 1 commit
  7. 19 Sep, 2017 1 commit
  8. 14 Sep, 2017 1 commit
  9. 13 Jun, 2017 3 commits
  10. 06 Jun, 2017 1 commit
  11. 05 Jun, 2017 1 commit
    • Tomáš Peterka's avatar
      Revert "[test] Do not check non-function commands" · 75650e2c
      Tomáš Peterka authored
      This reverts commit 889711ed
      
      This approach to solve checking of commands by logging is wrong. It can lead to malicious commands being executed so this test is no longer reliable.
      
      We just should not test issued commands - test should use an isolated environment and then inspect the impact.
      
      /reviewed-on !15
      75650e2c
  12. 02 Jun, 2017 2 commits
  13. 25 Oct, 2016 1 commit
  14. 19 Oct, 2016 1 commit
  15. 05 Oct, 2016 4 commits
  16. 28 Sep, 2016 3 commits
  17. 29 Apr, 2016 2 commits
  18. 27 Apr, 2016 1 commit
  19. 15 Nov, 2015 2 commits
    • Kirill Smelkov's avatar
      slapproxy: Teach slapproxy to handle non-ascii instance parameters · 347d33d6
      Kirill Smelkov authored
      1. when forming instance parameters xml dict on client side, we cannot
         use str() to convert parameter_value to string - because it breaks e.g.
         this way:
      
         In [1]: s = u'Привет Мир!'
         In [2]: str(s)
         ---------------------------------------------------------------------------
         UnicodeEncodeError                        Traceback (most recent call
      
         UnicodeEncodeError: 'ascii' codec can't encode characters in position
         0-5: ordinal not in range(128)
      
         Fix is: convert arguments to unicode strings.
      
      2. when decoding xml on server side it was erroneously assumed to be
         always unicode, and this way xml.encode('utf-8') fails if xml is str
         but with non-ascii characters:
      
         In [3]: r = 'hello world'
      
         In [4]: r.encode('utf-8')
         Out[4]: 'hello world'
      
         In [5]: t = s.encode('utf-8')
      
         In [6]: t
         Out[6]: '\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd0\xb5\xd1\x82 \xd0\x9c\xd0\xb8\xd1\x80!'
      
         In [7]: t.encode('utf-8')
         ---------------------------------------------------------------------------
         UnicodeDecodeError                        Traceback (most recent call last)
      
         UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)
      
         Fix is: don't assume xml string is unicode and decode it only, if it
                 is unicode, and leave as it is if it is just str.
      347d33d6
    • Kirill Smelkov's avatar
      *: Factor opening sqlite db into separate function · 8bf68261
      Kirill Smelkov authored
      Currently it is just sqlite3.connect(), but we'll want to add connection
      autotuning in the next patch, so before that let's consolidate all
      sqlite opening places in the code into one.
      8bf68261
  20. 13 Nov, 2015 1 commit
    • Alain Takoudjou's avatar
      Add partition size snapshot to slapos.collect · 8efa3740
      Alain Takoudjou authored
      Partition folder snapshot use du to calculate folder size and return value in Mb.
      This snapshot is enabled by default and will calculate size of each partition every 24hours.
      Partition with size < 1Mb are not are not reported (considered as empty).
      The behavior can be changed using some configurations in slapos.cfg:
      
      [collect]
      report_disk_usage = True
      
      disk_snapshot_process_pid_foder = /srv/slapgrid/var/run
      
      disk_snapshot_time_cycle = 86400
      8efa3740
  21. 27 Oct, 2015 1 commit
  22. 26 Oct, 2015 1 commit
  23. 15 Oct, 2015 1 commit
  24. 02 Oct, 2015 1 commit
  25. 25 Sep, 2015 1 commit
  26. 17 Jul, 2015 1 commit