Uploaded image for project: 'Observium'
  1. Observium
  2. OBS-1302

Explicitly use python2 for poller-wrapper.py

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Professional Edition
    • Poller
    • Various

    Description

      Currently the "interpreter" for the poller-wrapper.py is "python". Since more and more distros use python3 as default and this wrapper is not (yet) python3-compatible, this leads poller to stop working.

      So as long as poller-wrapper.py is not python3 compatible (it is not only that print-command is not in braces, it's also using no longer existing mysql-bindings) it might be a good idea to actually use

      #! /usr/bin/env python2

      as firstline, as this symlink should exist always (at least as long as there is a python2-interpreter installed).

      BR
      Jens

      Attachments

        Issue Links

          Activity

            [OBS-1302] Explicitly use python2 for poller-wrapper.py
            imcdona Isaac McDonald made changes -
            Link New: This issue is mentioned by OBS-3266 [ OBS-3266 ]
            landy Mike Stupalov made changes -
            Workflow Original: classic default workflow [ 12187 ] New: Observium workflow [ 14496 ]
            landy Mike Stupalov made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            landy Mike Stupalov made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]

            Fixed in r6417.

            Now use poller-wrapper.py

            landy Mike Stupalov added a comment - Fixed in r6417. Now use poller-wrapper.py
            opteamax Jens Ott added a comment -

            Works like a charm! Excellent work !!!
            THANK YOU VERY MUCH!

            opteamax Jens Ott added a comment - Works like a charm! Excellent work !!! THANK YOU VERY MUCH!
            opteamax Jens Ott added a comment -

            I'm at a customer on-site atm, will try hopefully later today ...

            opteamax Jens Ott added a comment - I'm at a customer on-site atm, will try hopefully later today ...

            Any comments, you tried to use new wrapper?

            landy Mike Stupalov added a comment - Any comments, you tried to use new wrapper?

            In r6412 added python3 compatible wrapper (separated): poller-wrapper3.py
            Try to use it (replace in crontab).

            Required additional python module:

            sudo apt-get install python3-setuptools
            sudo easy_install3 pip
            sudo pip3 install PyMySQL
            

            landy Mike Stupalov added a comment - In r6412 added python3 compatible wrapper (separated): poller-wrapper3.py Try to use it (replace in crontab). Required additional python module: sudo apt-get install python3-setuptools sudo easy_install3 pip sudo pip3 install PyMySQL
            opteamax Jens Ott added a comment -

            Ok, as said, maybe the customers ubuntu has symlink to /usr/bin/python => /usr/bin/python3 for some other packages/needs.

            On ArchLinux the default points to:

            $ /usr/bin/env python -V
            Python 3.4.3
            

            and I think more and more distros are going to default to 3.X soon

            opteamax Jens Ott added a comment - Ok, as said, maybe the customers ubuntu has symlink to /usr/bin/python => /usr/bin/python3 for some other packages/needs. On ArchLinux the default points to: $ /usr/bin/env python -V Python 3.4.3 and I think more and more distros are going to default to 3.X soon

            People

              landy Mike Stupalov
              opteamax Jens Ott
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: