Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You

...

can

...

use

...

Eclipse

...

or

...

any

...

Java

...

IDE

...

to

...

debug

...

the

...

cloudstack

...

systemVM

...

services

...

as

...

described

...

below:

...

Debug

...

a

...

live

...

agent

...

  1. login

...

  1. into

...

  1. ssvm,

...

  1. either

...

  1. console

...

  1. proxy

...

  1. or

...

  1. ssh(port

...

  1. 3922)

...

  1. kill

...

  1. all

...

  1. the

...

  1. processes

...

  1. named

...

  1. as(run.sh/_run.sh,

...

  1. and

...

  1. java)

...

  1. cd

...

  1. /usr/local/cloud/systemvm

...

  1. add

...

  1. the

...

  1. "

...

  1. -Xdebug

...

  1. -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=

...

  1. 8787

...

  1. "

...

  1. at

...

  1. end

...

  1. of

...

  1. "java

...

  1. "

...

  1. in

...

  1. _run.sh

...

  1. ./run.sh,

...

  1. the

...

  1. java

...

  1. agent

...

  1. will

...

  1. start,

...

  1. with

...

  1. debug

...

  1. port

...

  1. 8787

...

  1. is

...

  1. listened

...

  1. on.

...

  1. allow

...

  1. port

...

  1. 8787

...

  1. in

...

  1. ssvm,

...

  1. "iptables

...

  1. -I

...

  1. INPUT

...

  1. -I

...

  1. eth1

...

  1. -p

...

  1. tcp

...

  1. -m

...

  1. state

...

  1. --state

...

  1. NEW

...

  1. -m

...

  1. tcp

...

  1. --dport

...

  1. 8787

...

  1. -j

...

  1. ACCEPT",

...

  1. either

...

  1. eth1

...

  1. or

...

  1. eth2

...

  1. is

...

  1. ok.

...

Then

...

you

...

can

...

connect

...

to

...

agent

...

in

...

ssvm,

...

based

...

on

...

the

...

ip

...

address

...

based

...

on

...

on

...

eth1

...

or

...

eth2,

...

and

...

port

...

8787

...

Debug

...

a

...

mock

...

agent

...

Or

...

if

...

the

...

above

...

steps

...

sound

...

too

...

complicated,

...

you

...

can

...

debug

...

the

...

systemvm

...

resource

...

locally

...

using

...

the

...

cloudstack

...

codebase:

...

For

...

example,

...

There

...

is

...

unit

...

test

...

code,

...

called,

...

LocalNfsSecondaryStorageResourceTest,

...

you

...

can

...

mock

...

the

...

commands

...

send

...

to

...

resource,

...

then

...

test

...

it

...

locally,

...

but

...

the

...

requirement

...

is

...

that

...

your

...

local

...

machine

...

needs

...

to

...

be

...

able

...

to

...

mount

...

nfs(Both

...

Linux/Mac

...

works,

...

Windows

...

can't).

...

I'd

...

prefer

...

unit

...

test,

...

as

...

it's

...

easier

...

to

...

test/debug/fix.

...