[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [review] waagent: Windows Azure Linux Agent (part4)



Hideki Yamane <henrich@debian.or.jp> writes:

> Hi Arnaud,
>
> On Mon, 10 Dec 2012 16:44:17 +0100
> Arnaud Patard <apatard@hupstream.com> wrote:
>> submitted as bug #695575.
>
>  more fix
>  - it's python script, so Arch should be all

no, I'm not using all on purpose. The azure vm can only by x86_64 (azure
can't run 32bit systems). As I don't want any bug report about azure not
working on 32bits systems, I've limitted the arch to amd64.

>  - it fails to setup without /sbin/route that is provided by net-tools
>   (thanks to piuparts)

I knew about this one but is it really possible that someone ends up
without net-tools on their system ?

>  - removing package fails with sudo, however it seems that sudo package's problem
>  - can improve prerm/postrm script
>
> diff -Nru waagent-1.2/debian/control waagent-1.2/debian/control
> --- waagent-1.2/debian/control	2012-12-10 19:25:16.000000000 +0900
> +++ waagent-1.2/debian/control	2012-12-16 23:51:32.000000000 +0900
> @@ -8,8 +8,8 @@
>  
>  
>  Package: waagent
> -Architecture: amd64
> -Depends: ${misc:Depends}, ${python:Depends}, iptables, openssh-server, openssl, sudo
> +Architecture: all
> +Depends: ${misc:Depends}, ${python:Depends}, iptables, openssh-server, openssl, sudo, net-tools
>  Conflicts: network-manager
>  Description: Windows Azure Linux Agent
>   The Windows Azure Linux Agent (waagent) manages VM interaction with the Windows
>
>
>  In debian/prerm
>>         if [ -f /var/log/waagent.log ]; then
>>                 rm -f /var/log/waagent.log
>>         fi
>
>  not need to remove log files
>  

ok. I don't mind a lot about this one but I thought it was a bad idea to
keep logs files forever. Will remove.

>
>  and it can be simplified as below
> ------------------------------------------------------
> files="/etc/waagent.conf \
>          /etc/logrotate.d/waagent \
>          /etc/sudoers.d/waagent \
>          /var/lib/waagent"
>
> for file in files
> do
>     if [ -f $file ]; then
>         rm -f $file
>     elif [ -d $file ]; then
>         rm -rf $file
>     fi
> done

updated.

> ------------------------------------------------------
>
>  and it seems to be that waagent itself also has "delete" function, so
>  I doubt it should be done in maintainer script or not...

There's a -uninstall command line argument but afaik, it should not be
used unless you want to kill your vm, so it's best to remove theses
files only on purge. Eg. if you call -uninstall on upgrade, you'll loose
your vm. The problem is that on purge, waagent will be gone, so one can't
call it to remove the files.


Thanks,
Arnaud


Reply to: