Welcome to Centmin Mod Community
Register Now

Not A Bug centmin.sh Change Python to Centos included ones came up again after already running it

Discussion in 'Bug Reports' started by pamamolf, Aug 8, 2020.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    I am using latest Centminmod at latest Centos 7 and in the past i was run the included script to change the python? (didn't keep a note of it) to the included Centos ones....

    I did that 100% as i remember and already report that again here on the forums but today it came up again and i had to run the script manually again...

    Maybe something change or the detection routine needs some adjustments?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Centmin Mod 123.09beta01 already does run CentOS python packages, just Centmin Mod on centmin.sh does a check if pip upgrades are available and does them if it can and if not, alerts you to do them manually (as designed).
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I got a prompt to run this:
    Code:
    /usr/local/src/centminmod/addons/python36_install.sh
    I think is something different from the pip upgrade issue that i already did a separated topic for....
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    the prompt for the script run isn't for pip upgrades, it's to switch from Python 3.6 provided by EPEL YUM to Python 3.6 provided natively in CentOS YUM starting with CentOS 7.8
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Exactly.

    And i already did and now it ask me again to do it.....
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    If it still asks or you want to debug centmin.sh menu runs, use debug run logged to a log file to inspect what is going on underneath

    You can try running centmin.sh menu option 24 in debug mode logged to debug.txt text file in /root/centminlogs directory by running these 3 commands paying attention on 2nd command's run as to what text is displayed on the screen during any hangs you may experience.
    Code (Text):
    cd /usr/local/src/centminmod
    echo 24 | bash -x centmin.sh 2>&1 | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' | tee /root/centminlogs/debug.txt && echo "debug log saved at /root/centminlogs/debug.txt"
    sed -i "s|$(hostname)|hostname|g" /root/centminlogs/debug.txt
    

    Then copy the contents of /root/centminlogs/debug.txt into a pastebin.com or gist.github.com shared link - with an sensitive info masked or if you're more comfortable private message me with the link. At least server hostname will be replaced with word hostname instead via last sed replacement line.

    You can search the debug.txt log for keywords like 'python36_install.sh' to get to the section of centmin.sh debug run code relevant to the prompt or whatever you're troubleshooting for i.e. error messages or other messages you want to dig into troubleshooting.
     
  7. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    the lines in inc/cpcheck.inc that check if python36_install.sh prompt is made is at cpcheck.inc - centminmod/centminmod - Sourcegraph

    Code (Text):
        if [[ "$(yum list installed python34u* python35u* python36u* -q --exclude=python* 2>&1 | grep -v Installed | grep -v 'No matching Packages' | tr -s ' ' | column -t)" ]]; then
          PROMPT_FOR_BASE_PYTHON='y'
          YUM_EXCLUDE_PYTHON=' --exclude=python34-*,python35-*,python36-*'
        else
          YUM_EXCLUDE_PYTHON=""
        fi
    

    actual command it checks to see if non-empty output exists
    Code (Text):
    yum list installed python34u* python35u* python36u* -q --exclude=python* 2>&1 | grep -v Installed | grep -v 'No matching Packages' | tr -s ' ' | column -t

    if non-empty output exists, it will prompt
    Code (Text):
          if [[ "$CENTOS_SEVEN" = '7' && "$PROMPT_FOR_BASE_PYTHON" = [yY] ]]; then
            echo "detected python36u IUS Community YUM packages installed"
            echo "For CentOS 7 they have been replaced with native CentOS 7.7+"
            echo "python3 packages now"
            echo
            echo "One time task to run the addons/python36_install.sh script"
            echo "to switch from python36u to python3 packages for Python 3.6"
            echo "before doing YUM update command, run the script at:"
            echo "/usr/local/src/centminmod/addons/python36_install.sh"
          fi
    

    So check your yum history to see if you ever had any python34u, python35u or python36u packages installed
    Code (Text):
    yum history list python34u
    yum history list python35u
    yum history list python36u
    
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I am getting for all:

    Code:
    Loaded plugins: fastestmirror, langpacks, priorities, versionlock
    Bad transaction IDs, or package(s), given
    Error: Failed history list
     
  9. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    so those packages were never installs so strange it would trigger the prompt
     
  10. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    It seems that there is something triggering that as i got it again today on all my servers :)

    Without updating the system on the server or any software...

    The only automated upgrade was:

    Code:
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
    You should consider upgrading via the '/usr/bin/python2 -m pip install --upgrade pip' command.
    Don't know if that can trigger that message again but doesn't seem related :)

     
    Last edited: Sep 25, 2020
  11. eva2000

    eva2000 Administrator Staff Member

    45,449
    10,313
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,997
    Local Time:
    9:01 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    you mean the prompt to run /usr/local/src/centminmod/addons/python36_install.sh ?

    that is triggered when this command returns a value
    Code (Text):
    yum list installed python34u* python35u* python36u* -q --exclude=python* 2>&1 | grep -v Installed | grep -v 'No matching Packages' | tr -s ' ' | column -t

    can you post output for that command and this one
    Code (Text):
    yum history list python34u* python35u* python36u*
    

    and this one
    Code (Text):
    yum history list python* | head -n30
     
  12. pamamolf

    pamamolf Premium Member Premium Member

    3,861
    379
    83
    May 31, 2014
    Ratings:
    +731
    Local Time:
    1:01 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    yes

    Not sure if the results of the bellow commands can help as i already run the above command....

    Code:
    yum list installed python34u* python35u* python36u* -q --exclude=python* 2>&1 | grep -v Installed | grep -v 'No matching Packages' | tr -s ' ' | column -t
    and

    Code:
    yum history list python34u* python35u* python36u*
    returns nothing.

    Code:
    yum history list python* | head -n30