From 743c7afac122d07701de9077150edd22b72a265c Mon Sep 17 00:00:00 2001 From: ganglv <88995770+ganglyu@users.noreply.github.com> Date: Wed, 16 Oct 2024 09:13:50 +0800 Subject: [PATCH] Update dbus timeout (#305) 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. --- sonic_service_client/dbus_client.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sonic_service_client/dbus_client.go b/sonic_service_client/dbus_client.go index 73af426c..48291570 100644 --- a/sonic_service_client/dbus_client.go +++ b/sonic_service_client/dbus_client.go @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 } @@ -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 }