AWS - Status check fails when loading AMI created from snapshot

214

When you create an image from a snapshot, make sure you use the same architecture you used for the original instance/AMI. The default value in this wizard is i386, but in many cases you may want x86_64, which is the standard Amazon EC2 Linux architecture. This, together with selecting the exact AKI kernel - worked for me.

Share:
214

Related videos on Youtube

Toretto
Author by

Toretto

Updated on September 18, 2022

Comments

  • Toretto
    Toretto over 1 year

    I am facing a problem in which I have to refresh the scope value after 5 sec. Here's my controller constructor function where I initialize the value and call the timeout function to refresh the content after 5 sec.

    static $inject = ['$scope', 'selectedCardAccount', 'CardService', 'ecAnimationService', '$interval', '$modal','$rootScope','$timeout','PromiseTimeout','$q','$stateParams'];
                constructor(public $scope,public selectedCardAccount, public CardService:services.CardService, public $interval:ng.IIntervalService, public $modal,public $rootScope:ng.IRootScopeService, public $timeout,public PromiseTimeout,public $q,public TrackPendingRequest,public $stateParams) {
    
        //setting the current value
        this.account = selectedCardAccount.account;
    
        //calling a serive again after five section to referesh the content
        $timeout(function(){
                //delete the current object
            delete this.account;
            //calling service to get result
                    CardService.getAccountAndCardByShortName($stateParams.productShortName,$stateParams.id).then((succRess)=>{
    
                //setting the value
                //Error : cannot read property of account
                this.account = succRess.account;
            });
        }, 5000);
    }
    

    Error : cannot read property of account

    Directive code :

    module ec.directives {
            export class easein{
                /**
                 * A directive is not new:ed up so we don´t specify anything on this class
                 * */
                constructor(){
                    var directive: ng.IDirective = {};
                    directive.link = (scope:IEaseInNumberScope, element, attrs, ctrl:controllers.EaseInNumberCtrl) => {
                        ctrl.animateRemainingValue(scope);
                    };
                    directive.restrict = "EA";
                    directive.template = "{{current | number : 2}}";
                    directive.controller = 'EaseInNumberCtrl';
                    directive.scope = {
                        duration: "=?",
                        startValue: "=?",
                        endValue: "="
                    };
    
                    return directive;
                }
            }
    }
    

    HTML :

    <div class="row">
        <div class="col-xs-6">
            <h2 class="heading-small-bold light mar-l-1"
                ng-bind="'used_amount' | i18n"></h2>
    
            <h1 class="heading-big-thin-medium mar-l-1">
                <easein end-value="vm.account.usedCredit"></easein>
            </h1>
        </div>
        <div class="col-xs-6 align-r">
            <h2 class="heading-small-bold light mar-r-1"
                ng-bind="'left_to_spend' | i18n"></h2>
    
            <h1 class="heading-big-thin-medium mar-r-1">
                <easein start-value="vm.account.creditLimit"
                        end-value="vm.account.openToBuy"></easein>
            </h1>
        </div>
        <div class="col-xs-12 mar-t-2">
            <progressbar class="progress-bar" value="vm.loadingValue"
                         max="vm.account.creditLimit"
                         type="warning"></progressbar>
            <div class="flexible-header">
                <h2 class="heading-small-bold light"
                    ng-bind="'last_transactions' | i18n"></h2>
            </div>
        </div>
    </div>
    

    if some one has any suggestion that how can I refresh the value after 5 section in constructor please help.

    • cyberx86
      cyberx86 almost 12 years
      At a guess (check your console log, you might get more info) - either your AKI (kernel) or fstab (mounted volumes) differ. Check which AKI each image is launch with and see if they match. If it is your fstab trying to mount a non-existent volume, it should show up in your console log.
    • user784637
      user784637 almost 12 years
      @cyberx86 Thanks so much, I was using the default kernel to make the image. Is the console log in the aws console or is it cli? I couldn't find a console log in the aws console.
    • cyberx86
      cyberx86 almost 12 years
      You can usually view the console log from the AWS Console. In the EC2 tab, right click an instance, and select 'Get System Log' - of course, the instance has to have at least started booting (it is basically an output of dmesg on Linux instances).
    • khoxsey
      khoxsey over 11 years
      Are you using a RedHat or CentOS AMI? There are (were) some issues with the way the network connection was managed that prevented copying EBS-based images.
    • iberbeu
      iberbeu over 7 years
      is that the real error that you get? Normally you get cannot read property propName of whatever. Could you put the line number where you get this error?
  • Toretto
    Toretto over 7 years
    succRess is returning the proper object. what i just need to assigned that to this.account
  • Toretto
    Toretto over 7 years
    Now this.account get updated but the value in view not changed. I have custom directive on view to show this value
  • Sreekanth
    Sreekanth over 7 years
    do you see the account property on succRess object?
  • VRPF
    VRPF over 7 years
    That is because the reference to the initial object has changed. What is the type of this.account ? Keep the initial reference and update the properties that are important.
  • Toretto
    Toretto over 7 years
    So what i have to do to update value of custom directive
  • VRPF
    VRPF over 7 years
    I updated my answer. try using angular.copy(succRess.account, this.account);.
  • Toretto
    Toretto over 7 years
    not it not working , I also tries to run $apply to update value but nothing got chqnaged
  • VRPF
    VRPF over 7 years
    what does the account look like ? is it an array or an object ?
  • Toretto
    Toretto over 7 years
    it's object with no of property like name,opentobuy and creditlimit etc
  • VRPF
    VRPF over 7 years
    Hard to say. I suggest that you edit your snippet to make it run and reproduce your issue, including html template. It will then be easier for me (us) to investigate the problem.