[VOL-4156] openonuAdapterGo - cmd "voltctl device image activate" fails due to wrong timeout configuration
Change-Id: I565a855694d27c4939aa4932f7e208a16b150a54
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 6470a82..c60f28f 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -1134,7 +1134,7 @@
err = dh.createOnuUpgradeFsm(ctx, pDevEntry, OmciOnuSwUpgradeDone)
if err == nil {
if err = dh.pOnuUpradeFsm.SetDownloadParamsAfterDownload(ctx, inactiveImageID,
- apImageRequest, apDownloadManager, aImageIdentifier, dh.pOpenOnuAc.dlToOnuTimeout4M); err != nil {
+ apImageRequest, apDownloadManager, aImageIdentifier); err != nil {
logger.Errorw(ctx, "onu upgrade fsm could not set parameters", log.Fields{
"device-id": dh.deviceID, "error": err})
return
diff --git a/internal/pkg/onuadaptercore/omci_onu_upgrade.go b/internal/pkg/onuadaptercore/omci_onu_upgrade.go
index 19a9ff0..1c4caf8 100644
--- a/internal/pkg/onuadaptercore/omci_onu_upgrade.go
+++ b/internal/pkg/onuadaptercore/omci_onu_upgrade.go
@@ -155,6 +155,7 @@
requestEvent: aRequestEvent,
omciDownloadWindowSizeLimit: cOmciDownloadWindowSizeLimit,
omciSectionInterleaveDelay: cOmciSectionInterleaveMilliseconds,
+ downloadToOnuTimeout4MB: apDeviceHandler.pOpenOnuAc.dlToOnuTimeout4M,
waitCountEndSwDl: cWaitCountEndSwDl,
waitDelayEndSwDl: cWaitDelayEndSwDlSeconds,
volthaDownloadState: voltha.ImageState_DOWNLOAD_STARTED, //if FSM created we can assume that the download (to adapter) really started
@@ -264,7 +265,7 @@
// called from 'new' API Download_onu_image
func (oFsm *OnuUpgradeFsm) SetDownloadParamsAfterDownload(ctx context.Context, aInactiveImageID uint16,
apImageRequest *voltha.DeviceImageDownloadRequest, apDownloadManager *fileDownloadManager,
- aImageIdentifier string, aDownloadTimeout time.Duration) error {
+ aImageIdentifier string) error {
oFsm.mutexUpgradeParams.Lock()
var pBaseFsm *fsm.FSM = nil
if oFsm.pAdaptFsm != nil {
@@ -280,7 +281,6 @@
oFsm.imageVersion = apImageRequest.Image.Version
oFsm.activateImage = apImageRequest.ActivateOnSuccess
oFsm.commitImage = apImageRequest.CommitOnSuccess
- oFsm.downloadToOnuTimeout4MB = aDownloadTimeout
//TODO: currently straightforward options activate and commit are expected to be set and (unconditionally) done
// for separate handling of these options the FSM must accordingly branch from the concerned states - later
oFsm.mutexUpgradeParams.Unlock()