chen

Member

Last active 5 months ago

  1. 5 months ago
    Mon Jan 15 14:08:22 2018

    On C/D 1.2.1 our SMB distribution point was reported as

    Primary Distribution Point

    Path: /mnt/images/
    free 34%
    used 66%
    Free Space: 168.3 GB || Total: 492.0 GB

    But after upgrading to C/D 1.3.x this information is no longer available via C/D's GUI, instead it is reported as 0% free and 0% used.
    See more about our setup
    Note: we get the same results when Admin > Distribution Points > Location: is either Local or Remote.

  2. Mon Jan 15 13:52:32 2018

    We are upgraded from 1.2.1 to 1.3.0 + a patch that put us effectively on 1.3.1. And we overall happy with the upgrade.

    Our images resides on a SMB share, and it works fine, however in
    Our Admin > Distribution Points > Location: is configured to be Local. This setup work.

    But when I try to set it to Remote and try to deploy a computer I get an:

    ** Processing /dev/sda **
     
    Get hd_schema: profileId=7&clientHdNumber=0&newHdSize=120034123776&schemaHds=&clientLbs=512
     
    {"Message":"An error has occurred."}
     
    ** An Error Has Occurred **
     
    ...... Unknown Error Occurred While Determining Minimum HD Size Required. Check The Exception Log

    The full log is (identifying information was removed to protect the innocent):

    ** Looking For Active Task For 12:34:56:78:90:ab..AC75D100-9149-11E4-B187-F44D3064AB83 **
     
    {"computerId":"false","task":"ond","taskId":null}
     
    ...... This Computer Was Not Found
     
    ** Looking For Active Task For 12:34:56:78:90:ab **
     
    {"computerId":"6","task":"deploy","taskId":"5371"}
     
    ...... Success
     
    Found deploy Task For This Computer
     
    ** Displaying Boot Arguments **
     
    BOOT_IMAGE=kernels/4.9.8x64 initrd=images/initrd.xz root=/dev/ram0 rw ramdisk_size=156000 consoleblank=0 web=http://clonedeploy.my-host.my-domain/clonedeploy/api/ClientImaging/ USER_TOKEN=012345678-90ab-cdef-0123-4567890abcdef MAC: 12:34:56:78:90:ab
    Linux client_console.localdomain 4.9.8 #1 SMP Thu Feb 9 09:35:08 EST 2017 x86_64 GNU/Linux
     
    Boot Image Version: 1008
     
    ** Verifying Active Task **
     
    computer_name=pm07 image_name=ubuntu-1404-x64-minimal profile_id=7 server_ip=clonedeploy.my-host.my-domain pre_scripts="" post_scripts="" file_copy=False sysprep_tags="" task_completed_action="Reboot" osx_target_volume="" munki_repo_url="" change_computer_name=true fix_bootloader=true partition_method=dynamic dp_id="1"
     
    ...... Success
     
    ** Checking Current Queue **
     
    ...... Complete
     
    ** Mounting SMB Share **
     
    ...... Connecting To Default
    mount: mounting //1.2.3.4/images on /storage failed: Operation not supported
     
    ...... Success
     
    ** Looking For Hard Drive(s) **
     
    ...... Displaying Available Devices
    RO RA SSZ BSZ StartSec Size Device
    rw 256 512 1024 0 159744000 /dev/ram0
    rw 256 512 4096 0 120034123776 /dev/sda
    rw 256 512 4096 2048 524288000 /dev/sda1
    rw 256 512 4096 1026048 119508787200 /dev/sda2
    Disk /dev/ram0: 152.4 MiB, 159744000 bytes, 312000 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
     
     
    Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x000545ff
     
    Device Boot Start End Sectors Size Id Type
    /dev/sda1 * 2048 1026047 1024000 500M 83 Linux
    /dev/sda2 1026048 234441647 233415600 111.3G 8e Linux LVM
     
    ...... Found Drive(s)
     
    ...... Drive(s): /dev/sda
     
    ** Processing /dev/sda **
     
    Get hd_schema: profileId=7&clientHdNumber=0&newHdSize=120034123776&schemaHds=&clientLbs=512
     
    {"Message":"An error has occurred."}
     
    ** An Error Has Occurred **
     
    ...... Unknown Error Occurred While Determining Minimum HD Size Required. Check The Exception Log
    
    Yes No
    
        Tasks History 
    
    0 Active Task(s)
    
    
    
    No Active Tasks 

    Naturally I keeping it Local for now, but I suspect this isn't the optimal setting we could use. What am I missing?

  3. 6 months ago
    Thu Dec 7 07:53:25 2017

    Very cool!
    I assume you are speaking of ImageClassification. Is this correct?

  4. Thu Nov 23 07:13:27 2017
    chen posted in ComputerLog API.

    This can somewhat can simplify my code, for now I put a TODO comment to use the new API, for when we do the upgrade. Thanks.

  5. 7 months ago
    Mon Nov 6 07:06:43 2017
    chen posted in Logging level.

    We have a testing lab, that constantly deploy an image on a machine, runs the test, and do it again for a new test with a new image. We are using an API to drive this process (still not the official one that came with 1.3.0, that one is in the works, but one we hacked together).

    I got a report that a nightly test session failed because a scheduled deploy did not start. But after a manual reboot of the machine it did start.

    I wanted to gather data of what the system was asked to do, and what it was doing, to try and debug this issue.

  6. Sun Nov 5 16:28:27 2017
    chen started the conversation Logging level.

    Is there a way to increase the logging verbosity of components of C/D. I was able to do it for the tftpd server (by adding -v -v -v to the TFTP_OPTIONS at /etc/defaults/tftpd-hpa), but I don't know if I can rase the logging level of C/D DHCP Proxy, or the application running under apache2.

    Any advice?

  7. Mon Oct 30 09:24:37 2017
    chen started the conversation ComputerLog API.

    In the API we hacked together for C/D 1.2.1, by quiring the underlying database, we had a way (although not a pretty one) to get a log entry for a deployment job:

    Before we started a deploy job J for a ComputerId C, we found out the largest LogId L. Then the deploy job associated with J is the smallest LogId that is still larger than L where ComputerId is C.

    AFAIK, this surprisingly non-trivial task became even harder with the new API introduced by C/D 1.3.0:
    I can't find a good way getting the logs for a given computer. The best I can do is GET the /ComputerLog/GetOnDemandLogs, pick a sensible limit, filter the results, and if they do not contain the log entries I am looking for, increase the limit and repeat.

    Is there a better way for getting the log of a given deploy task?

  8. Wed Oct 25 15:57:22 2017

    That fixed it. Thanks.

    Will post in this thread in case I will find similar behavior elsewhere.

  9. Tue Oct 24 13:15:51 2017

    Just for posterity: I tried to stop apache2, clear /tmp and restart apache2 -- got the same results.

    I didn't know what logs should I look at, but if you need any other information I will do my best to post it here.

    Thanks.

  10. Tue Oct 24 13:06:32 2017

    The API we wrote to deal with this (and to work with v1.2.1), simply manipulates the allow list file, and restarts the cd_proxyd service. I guess there is no such stock API for C/D, and so we will keep this part of our code.

    May I suggest having such an API bundled with cd_proxyd?

View more