Make tasks upload on package upgrade idempotent
Previously, we were creating the symlink for default deployment graph without unlinking it. This creates second symlink within /etc/fuel/graphs/deploy directory Rename deploy graph to `default` to comply with plugins Change-Id: I0769dc84c38759aab6ef9288c00fb2dda40add7f Closes-bug: #1670182
This commit is contained in:
parent
363d6f21b7
commit
a646ae6a13
|
@ -16,12 +16,20 @@ for i in `fuel2 release list | grep -e Ubuntu | grep -v unavailable | awk '{ pri
|
|||
existing_releases=`fuel2 sequence list -r$i | grep deploy-changes | awk '{ print $4 }'`
|
||||
if ! [[ ${existing_releases[*]} =~ "$i" ]]
|
||||
then
|
||||
fuel2 sequence create -r$i -n deploy-changes -t net-verification deletion provision deploy
|
||||
fuel2 sequence create -r$i -n deploy-changes -t net-verification deletion provision default
|
||||
rc=$?
|
||||
if [[ $rc -eq 1 ]];
|
||||
then
|
||||
echo "Problem with sequence creation for release with id ${i} - command exited with ${rc} code"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
fuel2 sequence update -r$i -n deploy-changes -t net-verification deletion provision default
|
||||
rc=$?
|
||||
if [[ $rc -eq 1 ]];
|
||||
then
|
||||
echo "Problem with sequence update for release with id ${i} - command exited with ${rc} code"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -145,7 +145,14 @@ done
|
|||
# Create symlink for deployment graph
|
||||
# TODO(sbog): remove this when deployment graph will be splitted to separate
|
||||
# subgraphs
|
||||
ln -sf /etc/puppet/modules /etc/fuel/graphs/deploy
|
||||
if [ -L /etc/fuel/graphs/default ]
|
||||
then
|
||||
unlink /etc/fuel/graphs/default
|
||||
elif [ -d /etc/fuel/graphs/default ]
|
||||
then
|
||||
mv /etc/fuel/graphs/default /etc/fuel/graphs/default.old
|
||||
fi
|
||||
ln -sf /etc/puppet/modules /etc/fuel/graphs/default
|
||||
|
||||
if [ "$1" = 2 ]; then
|
||||
#Try to sync deployment tasks or notify user on upgrade
|
||||
|
|
Loading…
Reference in New Issue