Skip to content

Commit 743c7af

Browse files
authored
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.
1 parent 470e275 commit 743c7af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sonic_service_client/dbus_client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (c *DbusClient) ConfigReload(config string) error {
104104
busName := c.busNamePrefix + modName
105105
busPath := c.busPathPrefix + modName
106106
intName := c.intNamePrefix + modName + ".reload"
107-
_, err := DbusApi(busName, busPath, intName, 10, config)
107+
_, err := DbusApi(busName, busPath, intName, 60, config)
108108
return err
109109
}
110110

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

@@ -144,7 +144,7 @@ func (c *DbusClient) CreateCheckPoint(fileName string) error {
144144
busName := c.busNamePrefix + modName
145145
busPath := c.busPathPrefix + modName
146146
intName := c.intNamePrefix + modName + ".create_checkpoint"
147-
_, err := DbusApi(busName, busPath, intName, 10, fileName)
147+
_, err := DbusApi(busName, busPath, intName, 60, fileName)
148148
return err
149149
}
150150

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

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

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

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

0 commit comments

Comments
 (0)