Comments (14)
@zhukovgreen Yes the manual reboot works.
Thanks
from convert2rhel.
Thx @GeorgeDuckman We'll look into this and let you know
from convert2rhel.
@fellipeh I see that this env={'LC_ALL': 'C'} in run_subprocess was introduced in #83. Any ideas around this issue?
from convert2rhel.
Tracked under https://issues.redhat.com/browse/OAMG-4719
from convert2rhel.
Hi @GeorgeDuckman, are you unable to extract the conversion logs from the unbootable machine (located at /var/log/convert2rhel/convert2rhel.log). Thank you
from convert2rhel.
Hello @zhukovgreen, below the requested file, I had to delete some lines for professional reasons:
Thank you.
from convert2rhel.
@oamg/Convert2RHEL it seems @GeorgeDuckman hit a bug. From the log, I see that convert2rhel runs reboot
command which doesn't exists on centos6.
from convert2rhel.
Thanks, @GeorgeDuckman, we'll notify you of fixing this. However, it might unblock you, if you will try to run the convert2rhel utility without -r option:
-r, --restart Restart the system when it is successfully converted
to RHEL to boot the new RHEL kernel.
Please let me now if this manual reboot works for you
from convert2rhel.
@GeorgeDuckman could you please check output on the centos6 host which is failing to convert:
echo $PATH
ls /sbin/reboot
ls /sbin/shutdown
We are trying to reproduce the error
from convert2rhel.
@zhukovgreen I'll see to revert the host to a CentOS 6 server as soon as possible.
But if it helps, in my first post I said that the reboot command exists, I managed to use it from the command line. I then reproduced the code of the reboot function of convert2rhel and the reboot command is well executed by removing the "env={'LC_ALL': 'C'}" parameter part, which is surprising I admit.
from convert2rhel.
@GeorgeDuckman, when you try the conversion again, please try changing the line that runs the reboot
(https://github.com/oamg/convert2rhel/blob/v0.20/convert2rhel/utils.py#L117) to run_subprocess("/sbin/reboot")
, instead of removing the env
.
I hope that can resolve the issue.
from convert2rhel.
I was able to reproduce the issue in the CentOS 6.10 vagrant box we use for testing and development with just using -r
option. The above I recommended ("/sbin/reboot") fixed that.
from convert2rhel.
The explanation of the root cause is here: https://github.com/oamg/convert2rhel/pull/251/files#r616752752
from convert2rhel.
Sorry for the wait.
Here is some more information :
[root@serv~]# whereis reboot
reboot: /sbin/reboot /usr/share/man/man2/reboot.2.gz /usr/share/man/man8/reboot.8.gz
[root@serv~]# whereis shutdown
shutdown: /sbin/shutdown /usr/share/man/man3p/shutdown.3p.gz /usr/share/man/man2/shutdown.2.gz /usr/share/man/man8/shutdown.8.gz
And thanks @bocekm and @pirat89 , I tried replacing "reboot" with "/sbin/reboot" and it works flawlessly now. Here's the tiny script I used to test it :
import subprocess
import sys
import shlex
def run_subprocess(cmd="", print_cmd=True, print_output=True):
"""Call the passed command and optionally log the called command (print_cmd=True) and its
output (print_output=True). Switching off printing the command can be useful in case it contains
a password in plain text.
"""
if print_cmd:
print("Calling command '%s'" % cmd)
# Python 2.6 has a bug in shlex that interprets certain characters in a string as
# a NULL character. This is a workaround that encodes the string to avoid the issue.
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
cmd = cmd.encode("ascii")
cmd = shlex.split(cmd, False)
process = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
bufsize=1,
env={'LC_ALL': 'C'})
output = ''
for line in iter(process.stdout.readline, b''):
output += line.decode()
if print_output:
print(line.decode().rstrip('\n'))
# Call communicate() to wait for the process to terminate so that we can get the return code by poll().
# It's just for py2.6, py2.7+/3 doesn't need this.
process.communicate()
return_code = process.poll()
return output, return_code
run_subprocess("/sbin/reboot")
from convert2rhel.
Related Issues (20)
- Convert 2 RHEL offline HOT 1
- CentOS 8.5 >> RHEL 8.5 // CRITICAL - Could not resolve yum errors HOT 1
- CentOS7 >> RHEL 7 Converting with RH Satellite 6.11.2 HOT 2
- Traceback in check for most recent kernel version HOT 1
- _check_internet_access() in systeminfo.py may fail to return value HOT 6
- Test issue 1
- Test issue 2
- Test issue 3
- Test issue 4 HOT 7
- convert2rhel failed by yum strange behavior HOT 7
- Backup task ("backup_yum_repos" function in convert2rhel/repo.py) should keep "redhat.repo" when "--keep-rhsm" argument is present HOT 1
- No changes were made to the system HOT 1
- Convert failed HOT 2
- MySQL downgrade after conversion, service won't start HOT 4
- convert2rhel migration error HOT 4
- Convert2Rhel Migration from Rocky Error HOT 4
- FYI, converting from Rocky 8, issue with packages that have periods in the name HOT 2
- Support for EL9 based clones to convert to RHEL9 HOT 2
- convert2rhel silently hangs if too many (list too long) third-party packages HOT 2
- Error Message if LIST_THIRD_PARTY_PACKAGES HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from convert2rhel.