Ask Your Question
0

console.log max size

asked 2016-03-22 18:26:01 -0500

Marco45 gravatar image

I am trying to download output console log file from one of my instance. When I use novaclient or horizon webpage to show the log I only see the last 100k of log. I need more, I saw on the compute node that my file is bigger 154k, -rw-rw---- 1 nova libvirt-qemu 154K Mar 22 21:02 /var/lib/nova/instances/5986d7a9-2a86-469c-97e4-971cf558470d/console.log

But I don’t find a way to fetch to total contain of my log.

Could you help me,

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2019-10-10 04:02:46 -0500

Yi Song gravatar image

It looks the 100K is controlled by the following code on compute node.

I changed the MAX_CONSOLE_BYTES on driver.py source file, and restarted openstack-nova-compute.service, then it works.

But I don't see MAX_CONSOLE_BYTES in any nova configuration files.

/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py

MAX_CONSOLE_BYTES = 100 * units.Ki
...
                with libvirt_utils.file_open(path, 'rb') as fp:
                    log_data, remaining = utils.last_bytes(fp,
                                                           MAX_CONSOLE_BYTES)
                    if remaining > 0:
                        LOG.info(_LI('Truncated console log returned, '
                                     '%d bytes ignored'), remaining,
                                 instance=instance)
                    return log_data
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2016-03-22 18:26:01 -0500

Seen: 132 times

Last updated: Mar 22 '16