mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
client: standardize error logging format
This commit is contained in:
@@ -47,10 +47,10 @@ func (e *UniversalExecutor) configureIsolation() error {
|
||||
}
|
||||
if err := e.applyLimits(os.Getpid()); err != nil {
|
||||
if er := DestroyCgroup(e.groups); er != nil {
|
||||
e.logger.Printf("[ERROR] executor: error destroying cgroup: %v", er)
|
||||
e.logger.Printf("[ERR] executor: error destroying cgroup: %v", er)
|
||||
}
|
||||
if er := e.removeChrootMounts(); er != nil {
|
||||
e.logger.Printf("[ERROR] executor: error removing chroot: %v", er)
|
||||
e.logger.Printf("[ERR] executor: error removing chroot: %v", er)
|
||||
}
|
||||
return fmt.Errorf("error entering the plugin process in the cgroup: %v:", err)
|
||||
}
|
||||
@@ -67,9 +67,9 @@ func (e *UniversalExecutor) applyLimits(pid int) error {
|
||||
// Entering the process in the cgroup
|
||||
manager := getCgroupManager(e.groups)
|
||||
if err := manager.Apply(pid); err != nil {
|
||||
e.logger.Printf("[ERROR] executor: unable to join cgroup: %v", err)
|
||||
e.logger.Printf("[ERR] executor: unable to join cgroup: %v", err)
|
||||
if err := e.Exit(); err != nil {
|
||||
e.logger.Printf("[ERROR] executor: unable to kill process: %v", err)
|
||||
e.logger.Printf("[ERR] executor: unable to kill process: %v", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user