Skip to content

Commit

Permalink
Update dbus timeout (#305)
Browse files Browse the repository at this point in the history
Why I did it
dbus timeout is not enough for some hwsku.

How I did it
Increase dbus timeout to support all possible hwsku.

How to verify it
Run unit test and end2end test.
  • Loading branch information
ganglyu authored Oct 16, 2024
1 parent 470e275 commit 743c7af
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sonic_service_client/dbus_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (c *DbusClient) ConfigReload(config string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".reload"
_, err := DbusApi(busName, busPath, intName, 10, config)
_, err := DbusApi(busName, busPath, intName, 60, config)
return err
}

Expand All @@ -114,7 +114,7 @@ func (c *DbusClient) ConfigSave(fileName string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".save"
_, err := DbusApi(busName, busPath, intName, 10, fileName)
_, err := DbusApi(busName, busPath, intName, 60, fileName)
return err
}

Expand Down Expand Up @@ -144,7 +144,7 @@ func (c *DbusClient) CreateCheckPoint(fileName string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".create_checkpoint"
_, err := DbusApi(busName, busPath, intName, 10, fileName)
_, err := DbusApi(busName, busPath, intName, 60, fileName)
return err
}

Expand All @@ -154,7 +154,7 @@ func (c *DbusClient) DeleteCheckPoint(fileName string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".delete_checkpoint"
_, err := DbusApi(busName, busPath, intName, 10, fileName)
_, err := DbusApi(busName, busPath, intName, 60, fileName)
return err
}

Expand All @@ -164,7 +164,7 @@ func (c *DbusClient) StopService(service string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".stop_service"
_, err := DbusApi(busName, busPath, intName, 90, service)
_, err := DbusApi(busName, busPath, intName, 240, service)
return err
}

Expand All @@ -174,7 +174,7 @@ func (c *DbusClient) RestartService(service string) error {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".restart_service"
_, err := DbusApi(busName, busPath, intName, 90, service)
_, err := DbusApi(busName, busPath, intName, 240, service)
return err
}

Expand All @@ -184,7 +184,7 @@ func (c *DbusClient) GetFileStat(path string) (map[string]string, error) {
busName := c.busNamePrefix + modName
busPath := c.busPathPrefix + modName
intName := c.intNamePrefix + modName + ".get_file_stat"
result, err := DbusApi(busName, busPath, intName, 10, path)
result, err := DbusApi(busName, busPath, intName, 60, path)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 743c7af

Please sign in to comment.