troubleshooting apache cloudstack at #ccceu14 by @jorizvl

16
#CCCEU14

Upload: joris-van-lieshout

Post on 15-Aug-2015

295 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Page 2: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

TROUBLESHOOTING APACHE CLOUDSTACK

Page 3: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Working @ Schuberg Philis since 2010

Mission Critical

+3 year IaaS team

Part of the initial CS vs OS

Started with CloudStack 2.2.14

JORIS VAN LIESHOUT

Page 4: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Reading the logs

Understanding System VMs

Use the source, Luke!

DB API, hands off?

Employee Cloud

Questions

Side notes• Have you worked with ACS?• CloudStack 4.4.1• XenServer 6.2.0 SP1• Default log settings

AGENDA

Drag picture to placeholder or click icon to add

Page 5: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Less is more <=>• less /var/log/cloudstack/management/management-

server.log

Keep management server ids at hand• select * from cloud.mshost where removed is null;

Stack traces• Look at the first instead of the last

Search for API key

Log4j 1.2 EnhancedPatternLayout• /etc/cloudstack/management/log4j-cloud.xml

READING THE LOGS

Drag picture to placeholder or click icon to add

Page 6: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

(Date, Time), Log priority

Class• Will match a .java file in the source

READING THE LOGS

Page 7: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Thread Name

Thread context

Optional Job id

READING THE LOGS

Page 8: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

When forwarding commands• Host_id-Sequence_nr• MgmtId • Can be the other server

• Via• Command

READING THE LOGS

Page 9: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Find the first call• API call• API key• Name

Thread name and first context

Async creates a job

READING THE LOGS

Page 10: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Find the first call

Thread name and first context

Might creates a job

Picked up by…

READING THE LOGS

Page 11: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Thread name and first context

Sending…• Track sequence id• Keep an eye on MgmtID

Executing…

READING THE LOGS

Page 12: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

ssh to SVM• From hypervisor• Port 3922• /root/.ssh/id_rsa.cloud

xensourse.log, SMlog and cloud/vmops.log

XAPI call to vmops plugin

UNDERSTANDING SYSTEM VMS

Page 13: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

GitHub• https://github.com/apache/cloudstack

Eclipse for Java EE• https://cwiki.apache.org/confluence/display/

CLOUDSTACK/Using+Eclipse+With+CloudStack

DevCloud4• https://github.com/imduffy15/devcloud4

USE THE SOURCE, LUKE!

Drag picture to placeholder or click icon to add

Page 14: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Read only!

Unless…• After code review• Bug solution also changes db

Why?• Change state => data mismatch• Incorrect value => ACS start fails• DB data is not always leading• Effects of DB change can stick around

Marvin and CloudMonkey• And find a way out without DB change

DB API, HANDS OFF!

Drag picture to placeholder or click icon to add

Page 15: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

Realistic workload

Use as UAT environment

To reproduce bugs and workarounds

Technology test ground

EMPLOYEE CLOUD

Drag picture to placeholder or click icon to add

Page 16: Troubleshooting Apache CloudStack at #ccceu14 by @jorizvl

#CCCEU14

[email protected]

@JorizvL

QUESTIONS?

Drag picture to placeholder or click icon to add