You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Di Li <di...@ca.ibm.com> on 2016/04/27 20:19:13 UTC
Review Request 46745: AMBARI-16140: ambari-agent RPM yum update should
backup both stack and common-services
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46745/
-----------------------------------------------------------
Review request for Ambari and Alejandro Fernandez.
Bugs: AMBARI-16140
https://issues.apache.org/jira/browse/AMBARI-16140
Repository: ambari
Description
-------
When a user runs yum upgrade ambari-agent. The preinstall script backs up the stack dir in /var/lib/ambari-agent/cache by renaming it with a stampstamp. The same logic should happen for /var/lib/ambari-agent/cache/common-services.
Diffs
-----
ambari-agent/src/main/package/deb/control/preinst 7265c55
ambari-agent/src/main/package/rpm/preinstall.sh d7419d3
Diff: https://reviews.apache.org/r/46745/diff/
Testing
-------
build ambari-agent RPM, run yum upgrade ambari-agent against a trunk cluster, verify /var/lib/ambari-agent/cache/stack and /var/lib/ambari-agent/cache/common-services are backed up.
Thanks,
Di Li
Re: Review Request 46745: AMBARI-16140: ambari-agent RPM yum update
should backup both stack and common-services
Posted by Di Li <di...@ca.ibm.com>.
> On April 27, 2016, 7:44 p.m., Alejandro Fernandez wrote:
> > ambari-agent/src/main/package/deb/control/preinst, line 45
> > <https://reviews.apache.org/r/46745/diff/1/?file=1363750#file1363750line45>
> >
> > According to your comments, it is already backing up /var/lib/ambari-agent/cache, so why does a subdirectory need to be backuped too?
sorry, I wasn't being clear. I meant the stack dir under /var/lib/ambari-agent/cache/. The cache dir itself isn't backed up.
Here is what it currently looks like. There is just one cache dir. The /var/lib/ambari-agent/cache/stack was backed up as /var/lib/ambari-agent/cache/stacks_26_04_16_09_12.old. But /var/lib/ambari-agent/cache/common-services does not have a corresponding common-services-[timestamp] backup.
So the fix here is to backup the common-services dir just like how agent is currently backing up the stack dir.
[root@test1 ambari-agent]# ll
total 76
total 76
-rwx------ 1 root root 1123 Apr 23 13:36 ambari-env.sh
-rwxr-xr-x 1 root root 1429 Apr 23 13:36 ambari-python-wrap
-rwxr-xr-x 1 root root 1345 Apr 23 13:36 ambari-sudo.sh
drwxr-xr-x 10 root root 4096 Apr 26 09:15 cache
drwx------ 4 root root 36864 Apr 27 12:44 data
-rwx------ 1 root root 3169 Apr 23 13:36 install-helper.sh
drwxr-xr-x 2 root root 4096 Apr 23 13:36 keys
drwxr-xr-x 2 root root 4096 Apr 23 13:36 lib
drwxrwxrwx 5 root root 4096 Apr 27 12:45 tmp
-rwx------ 1 root root 2291 Apr 23 13:36 upgrade_agent_configs.py
[root@test1 ambari-agent]# ll cache/
total 32
drwxr-xr-x 2 root root 4096 Apr 26 07:21 alerts
drwxr-xr-x 2 root root 4096 Apr 26 07:21 cluster_configuration
drwxr-xr-x 30 root root 4096 Apr 26 09:12 common-services
drwxr-xr-x 3 root root 4096 Apr 26 09:12 custom_actions
drwxr-xr-x 2 root root 4096 Apr 26 09:16 host_scripts
drwxr-xr-x 2 root root 4096 Apr 26 09:15 recovery
drwxr-xr-x 3 root root 4096 Apr 26 09:12 stacks
drwxr-xr-x 3 root root 4096 Apr 26 07:07 stacks_26_04_16_09_12.old
- Di
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46745/#review130833
-----------------------------------------------------------
On April 27, 2016, 6:19 p.m., Di Li wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46745/
> -----------------------------------------------------------
>
> (Updated April 27, 2016, 6:19 p.m.)
>
>
> Review request for Ambari and Alejandro Fernandez.
>
>
> Bugs: AMBARI-16140
> https://issues.apache.org/jira/browse/AMBARI-16140
>
>
> Repository: ambari
>
>
> Description
> -------
>
> When a user runs yum upgrade ambari-agent. The preinstall script backs up the stack dir in /var/lib/ambari-agent/cache by renaming it with a stampstamp. The same logic should happen for /var/lib/ambari-agent/cache/common-services.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/package/deb/control/preinst 7265c55
> ambari-agent/src/main/package/rpm/preinstall.sh d7419d3
>
> Diff: https://reviews.apache.org/r/46745/diff/
>
>
> Testing
> -------
>
> build ambari-agent RPM, run yum upgrade ambari-agent against a trunk cluster, verify /var/lib/ambari-agent/cache/stack and /var/lib/ambari-agent/cache/common-services are backed up.
>
>
> Thanks,
>
> Di Li
>
>
Re: Review Request 46745: AMBARI-16140: ambari-agent RPM yum update
should backup both stack and common-services
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46745/#review130833
-----------------------------------------------------------
ambari-agent/src/main/package/deb/control/preinst (line 45)
<https://reviews.apache.org/r/46745/#comment194732>
According to your comments, it is already backing up /var/lib/ambari-agent/cache, so why does a subdirectory need to be backuped too?
- Alejandro Fernandez
On April 27, 2016, 6:19 p.m., Di Li wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46745/
> -----------------------------------------------------------
>
> (Updated April 27, 2016, 6:19 p.m.)
>
>
> Review request for Ambari and Alejandro Fernandez.
>
>
> Bugs: AMBARI-16140
> https://issues.apache.org/jira/browse/AMBARI-16140
>
>
> Repository: ambari
>
>
> Description
> -------
>
> When a user runs yum upgrade ambari-agent. The preinstall script backs up the stack dir in /var/lib/ambari-agent/cache by renaming it with a stampstamp. The same logic should happen for /var/lib/ambari-agent/cache/common-services.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/package/deb/control/preinst 7265c55
> ambari-agent/src/main/package/rpm/preinstall.sh d7419d3
>
> Diff: https://reviews.apache.org/r/46745/diff/
>
>
> Testing
> -------
>
> build ambari-agent RPM, run yum upgrade ambari-agent against a trunk cluster, verify /var/lib/ambari-agent/cache/stack and /var/lib/ambari-agent/cache/common-services are backed up.
>
>
> Thanks,
>
> Di Li
>
>
Re: Review Request 46745: AMBARI-16140: ambari-agent RPM yum update
should backup both stack and common-services
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/46745/#review130836
-----------------------------------------------------------
Ship it!
Ship It!
- Alejandro Fernandez
On April 27, 2016, 6:19 p.m., Di Li wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46745/
> -----------------------------------------------------------
>
> (Updated April 27, 2016, 6:19 p.m.)
>
>
> Review request for Ambari and Alejandro Fernandez.
>
>
> Bugs: AMBARI-16140
> https://issues.apache.org/jira/browse/AMBARI-16140
>
>
> Repository: ambari
>
>
> Description
> -------
>
> When a user runs yum upgrade ambari-agent. The preinstall script backs up the stack dir in /var/lib/ambari-agent/cache by renaming it with a stampstamp. The same logic should happen for /var/lib/ambari-agent/cache/common-services.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/package/deb/control/preinst 7265c55
> ambari-agent/src/main/package/rpm/preinstall.sh d7419d3
>
> Diff: https://reviews.apache.org/r/46745/diff/
>
>
> Testing
> -------
>
> build ambari-agent RPM, run yum upgrade ambari-agent against a trunk cluster, verify /var/lib/ambari-agent/cache/stack and /var/lib/ambari-agent/cache/common-services are backed up.
>
>
> Thanks,
>
> Di Li
>
>