Skip to content

Commit

Permalink
swss: gearsyncd should return 0 on exit (sonic-net#1376)
Browse files Browse the repository at this point in the history
- changes made to supervisord conf require gearsyncd to return 0 otherwise
restarts are performed, fail, and swss docker exits
- originally, gearsyncd did not exit, and if it did, 1 exit code was returned
to indicate failure. We converted this to do its job and exit, but did not
correct the exit code.
- prior state was not a problem until changes that are yet to merge for
sonic-buildimage supervisord conf made returning a 1 problematic.

  Signed-off-by: [email protected]
  • Loading branch information
sydlogan authored Aug 4, 2020
1 parent 7a4c15d commit ea30f2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gearsyncd/gearsyncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int main(int argc, char **argv)
break;
case 'h':
usage();
return 1;
return EXIT_FAILURE;
default: /* '?' */
usage();
return EXIT_FAILURE;
Expand Down Expand Up @@ -105,7 +105,7 @@ int main(int argc, char **argv)
cerr << "Exception \"" << e.what() << "\" had been thrown in gearsyncd daemon" << endl;
return EXIT_FAILURE;
}
return 1;
return EXIT_SUCCESS;
}

bool handleGearboxConfigFromConfigDB(ProducerStateTable &p, DBConnector &cfgDb, bool warm)
Expand Down

0 comments on commit ea30f2f

Please sign in to comment.