|
@@ -14,7 +14,10 @@ func (r *Registry) DoFusing() error {
|
|
|
lastErr error
|
|
lastErr error
|
|
|
err error
|
|
err error
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
|
|
+ if r.isFusing {
|
|
|
|
|
+ log.Infof("[fusing] Euspace is already in a state of fuse.")
|
|
|
|
|
+ return nil
|
|
|
|
|
+ }
|
|
|
//先处于熔断状态 (应用层的uprobes\stackUprobes将进行Detach操作)
|
|
//先处于熔断状态 (应用层的uprobes\stackUprobes将进行Detach操作)
|
|
|
r.isFusing = true
|
|
r.isFusing = true
|
|
|
for tryLeft := *flags.FuseTryMax; tryLeft > 0; tryLeft-- {
|
|
for tryLeft := *flags.FuseTryMax; tryLeft > 0; tryLeft-- {
|
|
@@ -55,7 +58,10 @@ func (r *Registry) DoResume() error {
|
|
|
lastErr error
|
|
lastErr error
|
|
|
err error
|
|
err error
|
|
|
)
|
|
)
|
|
|
-
|
|
|
|
|
|
|
+ if !r.isFusing {
|
|
|
|
|
+ log.Infof("[resume] Euspace is already in a state of resume.")
|
|
|
|
|
+ return nil
|
|
|
|
|
+ }
|
|
|
for tryLeft := *flags.FuseTryMax; tryLeft > 0; tryLeft-- {
|
|
for tryLeft := *flags.FuseTryMax; tryLeft > 0; tryLeft-- {
|
|
|
//先开启内核层的tracepoint、kprobe
|
|
//先开启内核层的tracepoint、kprobe
|
|
|
if err = r.tracer.LinkEbpfProg(); err != nil {
|
|
if err = r.tracer.LinkEbpfProg(); err != nil {
|