Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: name 'logging' is not defined. #4922

Closed
i-mine opened this issue Aug 29, 2019 · 8 comments
Closed

ERROR: name 'logging' is not defined. #4922

i-mine opened this issue Aug 29, 2019 · 8 comments

Comments

@i-mine
Copy link

@i-mine i-mine commented Aug 29, 2019

Installation details
Scylla version (or git commit hash): scylla-3.0.*
OS (RHEL/CentOS/Ubuntu/AWS AMI): CentOS on Huawei Cloud

when I execute scylla_setup or systemctl start scylla-server,there is a problem:

Aug 29 13:13:27 cassandra scylla_prepare: ERROR: name 'logging' is not defined. Your system can't be tuned until the issue is fixed.
Aug 29 13:13:27 cassandra scylla_prepare: Traceback (most recent call last):
Aug 29 13:13:27 cassandra scylla_prepare: File "/usr/lib/scylla/scylla_prepare", line 69, in <module>
Aug 29 13:13:27 cassandra scylla_prepare: run("{} --options-file /etc/scylla.d/perftune.yaml".format(perftune_base_command()))
Aug 29 13:13:27 cassandra scylla_prepare: File "/usr/lib/scylla/scylla_util.py", line 270, in run
Aug 29 13:13:27 cassandra scylla_prepare: return subprocess.check_call(cmd, shell=shell, stdout=stdout, stderr=stderr)
Aug 29 13:13:27 cassandra scylla_prepare: File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
Aug 29 13:13:27 cassandra scylla_prepare: raise CalledProcessError(retcode, cmd)
Aug 29 13:13:27 cassandra scylla_prepare: subprocess.CalledProcessError: Command '['/usr/lib/scylla/perftune.py', '--tune', 'disks', '--dir', '/var/lib/scylla/data', '--dir', '/var/lib/scylla/commitlog', '--options-file', '/etc/scylla.d/perftune.yaml']' returned non-zero exit status 1.
Aug 29 13:13:27 cassandra systemd: scylla-server.service: control process exited, code=exited status=1

I try to add import logging in /usr/lib/scylla/perftune.py,that works,but I don't want to add this line every time

@amoskong

This comment has been minimized.

Copy link
Contributor

@amoskong amoskong commented Aug 29, 2019

Commit scylladb/scylla-seastar@f541231 add a logging.warning() for seastar/scripts/perftune.py

After imported logging manually, did you see the warning?
Unexpected exception while attempting to access AWS meta server: ....

@i-mine

This comment has been minimized.

Copy link
Author

@i-mine i-mine commented Aug 30, 2019

yes,I can see the warning,I use the huawei instance, and when I try more times, it will be passed,but not
always.

@amoskong amoskong mentioned this issue Sep 4, 2019
1 of 1 task complete
@amoskong

This comment has been minimized.

Copy link
Contributor

@amoskong amoskong commented Sep 4, 2019

@i-mine what't the warning content?

/cc @tarzanek

@amoskong

This comment has been minimized.

Copy link
Contributor

@amoskong amoskong commented Sep 4, 2019

Hi @vladzcloudius, I see it's your code (seastar/scripts/perftune.py: __check_host_type()).
We need a fix for 3.0, and check if the unexpected exception is normal.

@i-mine

This comment has been minimized.

Copy link
Author

@i-mine i-mine commented Sep 4, 2019

If I don't import logging ,the scylla_setup will report error as blows:

Do you want to enable Network Interface Card (NIC) and disk(s) optimization?
Yes - optimize the NIC queue and disks settings. Selecting Yes greatly improves performance. No - skip this step.
[YES/no]yes
ERROR: name 'logging' is not defined. Your system can't be tuned until the issue is fixed.
Traceback (most recent call last):
  File "/usr/lib/scylla/scylla_sysconfig_setup", line 75, in <module>
    rps_cpus = out('{} --tune net --nic {} --get-cpu-mask'.format(perftune_base_command(), ifname))
  File "/usr/lib/scylla/scylla_util.py", line 280, in out
    return subprocess.check_output(cmd, shell=shell).strip().decode('utf-8')
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/lib/scylla/perftune.py', '--tune', 'disks', '--dir', '/var/lib/scylla/data', '--dir', '/var/lib/scylla/commitlog', '--tune', 'net', '--nic', 'eth0', '--get-cpu-mask']' returned non-zero exit status 1.
NIC queue setup failed. Press any key to continue...

@amoskong the warning content is

[YES/no]yes
Do you want to enable Network Interface Card (NIC) and disk(s) optimization?
Yes - optimize the NIC queue and disks settings. Selecting Yes greatly improves performance. No - skip this step.
[YES/no]yes
WARNING:root:Unexpected exception while attempting to access AWS meta server: <class 'socket.timeout'>
@amoskong

This comment has been minimized.

Copy link
Contributor

@amoskong amoskong commented Sep 4, 2019

If I don't import logging ,the scylla_setup will report error as blows:

Do you want to enable Network Interface Card (NIC) and disk(s) optimization?
Yes - optimize the NIC queue and disks settings. Selecting Yes greatly improves performance. No - skip this step.
[YES/no]yes
ERROR: name 'logging' is not defined. Your system can't be tuned until the issue is fixed.
Traceback (most recent call last):
  File "/usr/lib/scylla/scylla_sysconfig_setup", line 75, in <module>
    rps_cpus = out('{} --tune net --nic {} --get-cpu-mask'.format(perftune_base_command(), ifname))
  File "/usr/lib/scylla/scylla_util.py", line 280, in out
    return subprocess.check_output(cmd, shell=shell).strip().decode('utf-8')
  File "/usr/lib64/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib64/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/lib/scylla/perftune.py', '--tune', 'disks', '--dir', '/var/lib/scylla/data', '--dir', '/var/lib/scylla/commitlog', '--tune', 'net', '--nic', 'eth0', '--get-cpu-mask']' returned non-zero exit status 1.
NIC queue setup failed. Press any key to continue...

@amoskong the warning content is

[YES/no]yes
Do you want to enable Network Interface Card (NIC) and disk(s) optimization?
Yes - optimize the NIC queue and disks settings. Selecting Yes greatly improves performance. No - skip this step.
[YES/no]yes
WARNING:root:Unexpected exception while attempting to access AWS meta server: <class 'socket.timeout'>

Thanks. /CC @vladzcloudius

@avikivity

This comment has been minimized.

Copy link
Contributor

@avikivity avikivity commented Sep 4, 2019

Will be fixed by 42433a2.

@slivne

This comment has been minimized.

Copy link
Contributor

@slivne slivne commented Sep 5, 2019

merged 42433a2

closing

@slivne slivne closed this Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.